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

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

Issue 679863002: Revert "Prepare blink to unify definitions of load completion" (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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
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 };
32 xhr.send(); 26 xhr.send();
33 } 27 }
34 window.addEventListener("DOMSubtreeModified", sendXHR); 28 window.addEventListener("DOMSubtreeModified", sendXHR);
35 addElement(); 29 addElement();
36 </script> 30 </script>
37 This tests that when we re-entrantly create and cancel XHRs, we don't try to dis connect the same CachedResourceClient 31 This tests that when we re-entrantly create and cancel XHRs, we don't try to dis connect the same CachedResourceClient
38 multiple times from its CachedResource. We pass if we don't crash.<br/> 32 multiple times from its CachedResource. We pass if we don't crash.<br/>
39 </body> 33 </body>
40 </html> 34 </html>
41 35
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698