Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / workers / abort-exception-assert.html
blobcb93ba558896c6b780b6c70826ccc504d51e6f51
1 <html>
2 <body>
3 <p>XmlHttpRequest abort exception shouldn't assert.</p>
4 <p>On success, you should see a single PASS below.</p>
5 <script src="../../workers/resources/worker-util.js"></script>
6 <script>
7 if (window.testRunner) {
8 testRunner.dumpAsText();
9 testRunner.waitUntilDone();
12 var console_messages = document.createElement("ol");
13 document.body.appendChild(console_messages);
15 function log(message)
17 var item = document.createElement("li");
18 item.appendChild(document.createTextNode(message));
19 console_messages.appendChild(item);
22 var worker = new Worker('resources/endless-sync-xhr.js');
23 worker.onmessage = function(evt)
25 setTimeout("terminateWorkerAndFinish();", 100);
28 function terminateWorkerAndFinish()
30 // This is an (unlikley) race condition here in that the worker may not have started
31 // the sync xhr call at this point, but it has been greatly lessened by the 100ms delay.
32 worker.terminate();
33 waitUntilWorkerThreadsExit(doneWithTest);
36 function doneWithTest()
38 log("PASS");
39 if (window.testRunner)
40 testRunner.notifyDone();
42 </script>
43 </body>
44 </html>