2 <p>Test Timeouts (setTimeout, setInterval, clearTimeout, clearInterval).
</p>
5 var logIsFrozen
= false;
9 document
.getElementById("result").innerHTML
+= message
+ "<br>";
12 if (window
.testRunner
) {
13 testRunner
.dumpAsText();
14 testRunner
.waitUntilDone();
17 var worker
= new Worker('resources/worker-timeout.js');
19 worker
.onmessage = function(evt
) {
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.
28 if (window
.testRunner
)
29 testRunner
.notifyDone();