2 <div id="result"></div>
4 // This is a regression test for crbug.com/341754
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 if (document.location.hash.match(/done/)) {
11 document.getElementById("result").innerHTML = "Done.";
12 testRunner.notifyDone();
14 var w = new Worker("resources/worker-create-ws.js");
15 var start = new Date() - 0;
16 // Wait 300ms without allowing any tasks to run. This gives time for the
17 // Worker to be created and post a task to create the WebSocket on the main
18 // thread, without actually letting that task be executed.
19 while (new Date() - start < 300) {}
20 // Cause the Worker to be destroyed.
21 location.hash = "done";