Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / xmlhttprequest / onabort-event.html
blobcda80e270e6a703377b0f34ee7976a396e5612ea
1 <html>
2 <body>
3 <p>This test that the abort event is fired for XMLHttpRequests when calling xhr.abort()</p>
4 <pre id='console'></pre>
5 <script type="text/javascript">
6 if (window.testRunner) {
7 testRunner.dumpAsText();
8 testRunner.waitUntilDone();
11 function log(message)
13 document.getElementById('console').appendChild(document.createTextNode(message + "\n"));
16 var xhr;
18 function abortHandler(evt)
20 log("PASS: abort event fired.");
21 if (window.testRunner)
22 testRunner.notifyDone();
25 xhr = new XMLHttpRequest;
26 xhr.onabort = abortHandler;
27 xhr.open("GET", "resources/endlessxml.php", true);
28 xhr.send();
29 xhr.abort();
30 </script>
31 </body>
32 </html>