WorkerGlobalScope_ErrorEvent_lineno.htm (647B)
1 <!DOCTYPE html> 2 <title> WorkerGlobalScope onerror event handler argument: line </title> 3 <script src="/resources/testharness.js"></script> 4 <script src="/resources/testharnessreport.js"></script> 5 <div id=log></div> 6 <script> 7 // The worker events races with the window's load event; if the worker events 8 // arrive first, the harness will detect the error event and fail the test. 9 setup({ allow_uncaught_exception: true }); 10 11 async_test(function(t) { 12 var worker = new Worker('./support/ErrorEvent.js'); 13 worker.onmessage = t.step_func_done(function(e) { 14 assert_equals(e.data.lineno, 3); 15 }); 16 worker.postMessage("Error Message"); 17 }); 18 </script>