3 <title>Test XMLHttpRequest frame load abort causes unexpected notification activity
</title>
4 <meta http-equiv=
"content-type" content=
"text/html;charset=utf-8">
6 <body onload=
"startTest()">
7 <p>Test for
<a href=
"https://bugs.webkit.org/show_bug.cgi?id=11450">bug
11450</a>
8 REGRESSION: XMLHttpRequest::didFinishLoading() should immediately return if the request has already been aborted
</p>
9 <p>If a frame has an active XMLHttpRequest that is still receiving data, and that frame is destroyed
<br>
10 (or its load is otherwise stopped) the XMLHttpRequest gets an abort call then a didFinishedLoading call.
</p>
11 <p>That didFinishedLoading() call should immediately exit and not update the object's state or do any
12 other notifications.
</p>
15 var console_messages
= document
.createElement("ul");
16 document
.body
.appendChild(console_messages
);
22 if (window
.testRunner
) {
23 testRunner
.waitUntilDone();
24 testRunner
.dumpAsText();
26 log("Loading subframe to cancel");
27 framediv
= document
.getElementById('framediv');
28 framediv
.innerHTML
= '<iframe src="resources/frame-load-to-cancel.html" width=0 height=0 border=0></iframe>';
31 function subframeLoaded()
33 log("Body of subframe is loaded. XMLHttpRequest should be in progress. Nuking the iframe");
34 framediv
.innerHTML
= 'Test complete';
35 log("Iframe removed");
36 if (window
.testRunner
)
37 testRunner
.notifyDone();
40 function dumpRequestStatus(req
) {
41 try { log ("Ready State: " + req
.readyState
); } catch (ex
) { log("Exception getting status: " + ex
.message
); }
46 var item
= document
.createElement("li");
47 item
.appendChild(document
.createTextNode(message
));
48 console_messages
.appendChild(item
);
52 <div id=
"framediv" name=
"framediv" style=
"visibility:hidden">