2 <p>Test Worker.terminate().</p>
7 document.getElementById("result").innerHTML += message + "<br>";
12 if (window.GCController)
13 return GCController.collect();
15 for (var i = 0; i < 10000; i++) { // > force garbage collection (FF requires about 9K allocations before a collect)
16 var s = new String("abc");
20 if (window.layoutTestController) {
21 layoutTestController.dumpAsText();
22 layoutTestController.waitUntilDone();
25 var worker = new Worker('resources/worker-common.js');
28 var worker2 = new Worker('resources/worker-common.js');
33 var worker3 = new Worker('resources/worker-common.js');
34 worker3.onmessage = function(evt) {
37 worker3.postMessage("eval true");
40 var worker4 = new Worker('resources/worker-common.js');
41 worker4.onmessage = function(evt) {
42 worker4.onmessage = function() { log("FAIL"); }
43 worker4.postMessage("eval true");
45 log("Received message from worker4.");
46 setTimeout("log('DONE'); if (window.layoutTestController) layoutTestController.notifyDone()", 1000);
48 worker4.postMessage("eval true");