1 <p>This page tests for a GC crash when tearing down a worker. If the tests passes,
2 you'll see a PASS message below.</p>
4 <pre id="console"></pre>
9 return document.getElementById(id);
14 $("console").appendChild(document.createTextNode(s + "\n"));
18 if (window.layoutTestController) {
19 layoutTestController.dumpAsText();
20 layoutTestController.waitUntilDone();
23 var worker = new Worker("resources/worker-gc2.js");
24 worker.onmessage = function () {
25 log("PASS: You didn't crash.");
27 // Try to wait for the worker to finish closing.
28 setTimeout(function () {
29 if (window.layoutTestController)
30 layoutTestController.notifyDone();