blob: 4f76f78276b14cdfc9368b16f62105c9bf95d1f6 [file] [log] [blame]
<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.py", true);
xhr.send();
xhr.abort();
</script>
</body>
</html>