002.html (527B)
1 <!doctype html> 2 <title>shared worker, addEventListener</title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id=log></div> 6 <script> 7 setup({allow_uncaught_exception:true}); 8 async_test(function() { 9 window.onerror = this.step_func(function(a) { 10 assert_unreached('window.onerror invoked: ' + a); 11 }); 12 var worker = new SharedWorker('002.js', ''); 13 worker.port.onmessage = this.step_func_done(function(e) { 14 assert_equals(e.data, ''); 15 }); 16 }); 17 </script>