| <html> |
| <body> |
| <p>This test that the abort event is fired for XMLHttpRequests when calling xhr.abort()</p> |
| <pre id='console'></pre> |
| <script type="text/javascript"> |
| if (window.testRunner) { |
| testRunner.dumpAsText(); |
| testRunner.waitUntilDone(); |
| } |
| |
| function log(message) |
| { |
| document.getElementById('console').appendChild(document.createTextNode(message + "\n")); |
| } |
| |
| var xhr; |
| |
| function abortHandler(evt) |
| { |
| log("PASS: abort event fired."); |
| if (window.testRunner) |
| testRunner.notifyDone(); |
| } |
| |
| xhr = new XMLHttpRequest; |
| xhr.onabort = abortHandler; |
| xhr.open("GET", "resources/endlessxml.php", true); |
| xhr.send(); |
| xhr.abort(); |
| </script> |
| </body> |
| </html> |