1 if (window.testRunner) {
2 testRunner.dumpAsText();
3 testRunner.waitUntilDone();
6 description("This test checks whether exceptions in SharedWorkers are logged to the parent document. An exception should be logged to the error console.");
8 var worker = createWorker();
9 worker.postMessage("throw");
10 worker.postMessage("ping");
12 // Wait for response from ping - that's how we know we have thrown the exception.
13 worker.onmessage = function(event)
17 // Give the console message a chance to be written out before ending the test (timers are processed after the task queue is empty).
23 debug('<br /><span class="pass">TEST COMPLETE</span>');
24 if (window.testRunner)
25 testRunner.notifyDone();