Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / worker-terminate.html
bloba89b9b4c2c47ddeaa38f275b7d3a1a53922d3578
1 <body>
2 <p>Test Worker.terminate().</p>
3 <div id=result></div>
4 <script>
5 function log(message)
7 document.getElementById("result").innerHTML += message + "<br>";
10 function gc()
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.testRunner) {
21 testRunner.dumpAsText();
22 testRunner.waitUntilDone();
25 var worker = new Worker('resources/worker-common.js');
26 worker.terminate();
28 var worker2 = new Worker('resources/worker-common.js');
29 worker2.terminate();
30 worker2 = 0;
31 gc();
33 var worker3 = new Worker('resources/worker-common.js');
34 worker3.onmessage = function(evt) {
35 log("FAIL");
37 worker3.postMessage("eval true");
38 worker3.terminate();
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");
44 worker4.terminate();
45 log("Received message from worker4.");
46 setTimeout("log('DONE'); if (window.testRunner) testRunner.notifyDone()", 1000);
48 worker4.postMessage("eval true");
50 </script>
51 </body>
52 </html>