Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / send-on-abort.html
blob611f24e6fd61fc4bb3bb32c60e7fd300631b3bde
1 <!-- https://bugs.webkit.org/show_bug.cgi?id=22672
2 ASSERT(m_table) when xhr.onabort creates another xhr or calls setTimeout
3 -->
4 <script>
5 if (window.testRunner) {
6 testRunner.dumpAsText();
7 testRunner.waitUntilDone();
10 function abortHandler()
12 xhr2 = new XMLHttpRequest;
13 setTimeout("alert('FAAAIL!')", 100);
16 function onreadystatechangeHandler()
18 if (xhr.readyState == 4)
19 abortHandler();
22 xhr = new XMLHttpRequest;
23 xhr.onabort = abortHandler;
24 xhr.onreadystatechange = onreadystatechangeHandler;
25 xhr.open("GET", "foo.txt", true);
26 xhr.send(null);
27 location.href = "data:text/html,PASS: No assertion failure.<script>if (window.testRunner) testRunner.notifyDone()</scr" + "ipt>";
28 </script>