blob: bd97b68358d628b440084684bb0534cad2db899b [file] [log] [blame]
<!doctype html>
<title>XMLHttpRequest: abort() after successful receive should not fire "abort" event</title>
<script src="/resources/testharness.js"></script>
<script src="/resources/testharnessreport.js"></script>
<link rel="help" href="" data-tested-assertations="following::ol[1]/li[4] following::ol[1]/li[5]"/>
<div id="log"></div>
var test = async_test();
test.step(function() {
var client = new XMLHttpRequest();
client.onreadystatechange = test.step_func(function() {
if (client.readyState == 4) {
// abort should not cause the "abort" event to fire
assert_equals(client.readyState, 0);
setTimeout(function(){ // use a timeout to catch any implementation that might queue an abort event for later - just in case
}, 200);
client.onabort = test.step_func(function () {
// this should not fire!
assert_unreached("abort() should not cause the abort event to fire");
});"GET", "resources/well-formed.xml", true);