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

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

Issue 76133002: XHR: reset error flag on aborting request that restarts. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-abort.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!doctype html>
2 <html>
3 <body>
1 <script> 4 <script>
2 if (window.testRunner) 5 if (window.testRunner)
3 testRunner.dumpAsText(); 6 testRunner.dumpAsText();
4 7
5 function addElement() { 8 function log(str)
6 document.documentElement.appendChild(document.createTextNode('X')); 9 {
10 document.body.appendChild(document.createTextNode(str));
11 document.body.appendChild(document.createElement("br"));
12 }
13
14 function addElement(e)
15 {
16 var txt = (e && e.type) || "insertedText";
17 log(txt);
7 } 18 }
8 document.addEventListener("DOMContentLoaded", addElement, false); 19 document.addEventListener("DOMContentLoaded", addElement, false);
9 window.onload = addElement; 20 window.onload = addElement;
10 21
11 var xhr = new XMLHttpRequest; 22 var xhr = new XMLHttpRequest;
12 function sendXHR() 23 function sendXHR()
13 { 24 {
14 xhr.open("GET", "", true); 25 xhr.open("GET", "", true);
15 xhr.send(); 26 xhr.send();
16 } 27 }
17 window.addEventListener("DOMSubtreeModified", sendXHR); 28 window.addEventListener("DOMSubtreeModified", sendXHR);
18 addElement(); 29 addElement();
19 </script> 30 </script>
20 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
21 multiple times from its CachedResource. We pass if we don't crash. 32 multiple times from its CachedResource. We pass if we don't crash.<br/>
33 </body>
34 </html>
35
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/http/tests/xmlhttprequest/reentrant-cancel-abort.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698