Move parseFontFaceDescriptor to CSSPropertyParser.cpp
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / fast / workers / worker-timeout-cancel-order.html
blobaa70fdf59a88214b64256a865997f3aedb91eda1
1 <!DOCTYPE html>
2 <html>
3 <body>
4 <p>Test setTimeOut,cancelTimeout in Web Workers.</p>
5 <div id="result"></div>
6 <script type="text/javascript">
7 function log(message)
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-cancel-order.js');
18 var testAlreadyFailed = false;
20 worker.postMessage("TS");
22 worker.onmessage = function(evt) {
23 if (evt.data == "DONE") {
24 log("DONE.");
25 if (window.testRunner)
26 testRunner.notifyDone();
28 if(2 == evt.data && !testAlreadyFailed) {
29 log("PASS: Timeout canceled.");
31 else if(1 == evt.data) {
32 testAlreadyFailed = true;
33 log("FAIL: Timeout did not cancel.");
35 if(evt.data == "Test started.") {
36 log(evt.data);
39 </script>
40 </body>
41 </html>