summaryrefslogtreecommitdiffstats
path: root/testing/web-platform/tests/workers/interfaces/WorkerGlobalScope/onerror/propagate-to-window-onerror.html
blob: b6a61e2355c0a637d560b85621ddd8172f68d824 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<!--
function x() {
  y();
}
x();
/*
-->
<!doctype html>
<title>onerror, "not handled" with only window.onerror defined</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<div id="log"></div>
<script>
setup({
  allow_uncaught_exception: true,
});
async_test(function() {
  var worker = new Worker('#');
  window.onerror = this.step_func(function(a, b, c, d) {
    assert_equals(typeof a, 'string', 'first argument');
    assert_equals(b, document.URL+'#', 'second argument');
    assert_equals(typeof c, 'number', 'third argument');
    assert_equals(typeof d, 'number', 'fourth argument');
    this.done();
    return true; // "handled"
  });
});
</script>
<!--
*/
//-->