OLD | NEW |
| (Empty) |
1 <!-- | |
2 onconnect = function (e) { | |
3 setTimeout(function() { e.ports[0].postMessage(''); }, 250); | |
4 y(); // will "report the error" | |
5 // onerror is null so it'll be "not handled", and the error should be | |
6 // reported to the user, although we don't test that here | |
7 // make sure we don't fire an error event on the message port or the | |
8 // SharedWorker object | |
9 } | |
10 | |
11 | |
12 /* | |
13 --> | |
14 <!doctype html> | |
15 <title>shared worker, no error event on worker or port</title> | |
16 <script src="/resources/testharness.js"></script> | |
17 <script src="/resources/testharnessreport.js"></script> | |
18 <div id=log></div> | |
19 <script> | |
20 setup({allow_uncaught_exception:true}); | |
21 async_test(function() { | |
22 window.onerror = this.step_func(function(a) { | |
23 assert_unreached('window.onerror invoked: ' + a); | |
24 }); | |
25 var worker = new SharedWorker('#', ''); | |
26 worker.addEventListener('error', this.step_func(function(e) { | |
27 assert_unreached('error on worker'); | |
28 }), false); | |
29 worker.port.addEventListener('error', this.step_func(function(e) { | |
30 assert_unreached('error on port'); | |
31 }), false); | |
32 worker.port.onmessage = this.step_func_done(function(e) { | |
33 assert_equals(e.data, ''); | |
34 }); | |
35 }); | |
36 </script> | |
37 <!-- | |
38 */ | |
39 //--> | |
OLD | NEW |