Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(247)

Side by Side Diff: LayoutTests/http/tests/xmlhttprequest/reentrant-cancel.html

Issue 561813003: Prepare blink to unify definitions of load completion (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add document.close() to scroll-left-while-loading.html Created 6 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 <!doctype html> 1 <!doctype html>
2 <html> 2 <html>
3 <body> 3 <body>
4 <script> 4 <script>
5 if (window.testRunner) 5 if (window.testRunner)
6 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
7 7
8 function log(str) 8 function log(str)
9 { 9 {
10 document.body.appendChild(document.createTextNode(str)); 10 document.body.appendChild(document.createTextNode(str));
11 document.body.appendChild(document.createElement("br")); 11 document.body.appendChild(document.createElement("br"));
12 } 12 }
13 13
14 function addElement(e) 14 function addElement(e)
15 { 15 {
16 var txt = (e && e.type) || "insertedText"; 16 var txt = (e && e.type) || "insertedText";
17 log(txt); 17 log(txt);
18 } 18 }
19 document.addEventListener("DOMContentLoaded", addElement, false); 19 document.addEventListener("DOMContentLoaded", addElement, false);
20 window.onload = addElement; 20 window.onload = addElement;
21 21
22 var xhr = new XMLHttpRequest; 22 var xhr = new XMLHttpRequest;
23 function sendXHR() 23 function sendXHR()
24 { 24 {
25 xhr.open("GET", "", true); 25 xhr.open("GET", "", true);
26 xhr.onreadystatechange = function() {
27 if (xhr.readyState != 4)
28 return;
29 if (window.testRunner)
30 testRunner.notifyDone();
31 };
26 xhr.send(); 32 xhr.send();
27 } 33 }
28 window.addEventListener("DOMSubtreeModified", sendXHR); 34 window.addEventListener("DOMSubtreeModified", sendXHR);
29 addElement(); 35 addElement();
30 </script> 36 </script>
31 This tests that when we re-entrantly create and cancel XHRs, we don't try to dis connect the same CachedResourceClient 37 This tests that when we re-entrantly create and cancel XHRs, we don't try to dis connect the same CachedResourceClient
32 multiple times from its CachedResource. We pass if we don't crash.<br/> 38 multiple times from its CachedResource. We pass if we don't crash.<br/>
33 </body> 39 </body>
34 </html> 40 </html>
35 41
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698