[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / workers / worker-gc2.html
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>
3
4 <pre id="console"></pre>
5
6 <script>
7 function $(id)
8 {
9     return document.getElementById(id);
10 }
11
12 function log(s)
13 {
14     $("console").appendChild(document.createTextNode(s + "\n"));
15 }
16
17 (function () {
18     if (window.layoutTestController) {
19         layoutTestController.dumpAsText();
20         layoutTestController.waitUntilDone();
21     }
22
23     var worker = new Worker("resources/worker-gc2.js");
24     worker.onmessage = function () {
25         log("PASS: You didn't crash.");
26
27         // Try to wait for the worker to finish closing.
28         setTimeout(function () {
29             if (window.layoutTestController)
30                 layoutTestController.notifyDone();
31         }, 0);
32     }
33 })();
34 </script>