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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/xmlhttprequest/connection-error-sync.html

Issue 1910723003: Add layout tests for notification icon with redirect loop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@NotificationTestsUsePromises
Patch Set: Rebase. Created 4 years, 8 months 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 <html> 1 <html>
2 <head> 2 <head>
3 <body> 3 <body>
4 <p>Test the behavior of a sync XMLHttpRequest that encounters an infinite redire ction loop.</p> 4 <p>Test the behavior of a sync XMLHttpRequest that encounters an infinite redire ction loop.</p>
5 <script> 5 <script>
6 6
7 if (window.testRunner) 7 if (window.testRunner)
8 testRunner.dumpAsText(); 8 testRunner.dumpAsText();
9 9
10 try { 10 try {
11 if (window.XMLHttpRequest) { 11 if (window.XMLHttpRequest) {
12 req = new XMLHttpRequest(); 12 req = new XMLHttpRequest();
13 } else { 13 } else {
14 try { 14 try {
15 req = new ActiveXObject("Msxml2.XMLHTTP"); 15 req = new ActiveXObject("Msxml2.XMLHTTP");
16 } catch (ex) { 16 } catch (ex) {
17 req = new ActiveXObject("Microsoft.XMLHTTP"); 17 req = new ActiveXObject("Microsoft.XMLHTTP");
18 } 18 }
19 } 19 }
20 20
21 req.open('GET', 'resources/infinite-loop.php', false); 21 req.open('GET', '../resources/infinite-loop.php', false);
22 req.onreadystatechange = function() 22 req.onreadystatechange = function()
23 { 23 {
24 document.write('onreadystatechange is invoked unexpectedly<br>'); 24 document.write('onreadystatechange is invoked unexpectedly<br>');
25 } 25 }
26 req.onerror = function() 26 req.onerror = function()
27 { 27 {
28 document.write('onerror is invoked unexpectedly<br>'); 28 document.write('onerror is invoked unexpectedly<br>');
29 } 29 }
30 req.send(null); 30 req.send(null);
31 31
32 document.write("Status: " + req.status); 32 document.write("Status: " + req.status);
33 33
34 } catch (ex) { 34 } catch (ex) {
35 document.write("Exception " + ex.name + "; code=" + ex.code + "; number= " + ex.number + " (" + (ex.number & 0xFFFF) + "); message='" + ex.message + "'") ; 35 document.write("Exception " + ex.name + "; code=" + ex.code + "; number= " + ex.number + " (" + (ex.number & 0xFFFF) + "); message='" + ex.message + "'") ;
36 } 36 }
37 37
38 </script> 38 </script>
39 </body> 39 </body>
40 </html> 40 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698