[WK2] selection does not disappear after coping the text
[framework/web/webkit-efl.git] / LayoutTests / fast / workers / worker-timeout.html
1 <body>
2 <p>Test Timeouts (setTimeout, setInterval, clearTimeout, clearInterval).</p>
3 <div id=result></div>
4 <script>
5 var logIsFrozen = false;
6 function log(message)
7 {
8     if (!logIsFrozen)
9         document.getElementById("result").innerHTML += message + "<br>";
10 }
11
12 if (window.layoutTestController) {
13     layoutTestController.dumpAsText();
14     layoutTestController.waitUntilDone();
15 }
16
17 var worker = new Worker('resources/worker-timeout.js');
18
19 worker.onmessage = function(evt) {
20     log(evt.data);
21     if (evt.data == "DONE") {
22         // This flag is needed because in Chromium port, the notifyDone() does not immediately snapshots
23         // the result and the still-firing timer in the worker may cause more messages to be logged before
24         // actual termination of the test. However one objective of the test is to keep active interval
25         // while the worker gets destroyed, so we freeze log rather then stop the interval from firing.
26         // See https://bugs.webkit.org/show_bug.cgi?id=31452 for more info.
27         logIsFrozen = true;
28         if (window.layoutTestController)
29             layoutTestController.notifyDone();
30     } 
31 }
32 </script>
33 </body>
34 </html>