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

Side by Side Diff: LayoutTests/fast/xmlhttprequest/xmlhttprequest-detached-mixedcontent-no-crash.html

Issue 995783002: Gracefully handle mixed content checking on detached resource fetches. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 9 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
« no previous file with comments | « no previous file | LayoutTests/fast/xmlhttprequest/xmlhttprequest-detached-mixedcontent-no-crash-expected.txt » ('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> 1 <!DOCTYPE HTML>
2 <body> 2 <body>
3 <head> 3 <head>
4 <script src="../../resources/js-test.js"></script> 4 <script src="../../resources/js-test.js"></script>
5 </head> 5 </head>
6 <script> 6 <script>
7 description("Accessing FileReader when in a detached state."); 7 description("Performing mixed content checks in a detached setting shouldn't cra sh.");
8 8
9 window.jsTestIsAsync = true; 9 window.jsTestIsAsync = true;
10 10
11 var w; 11 var w;
12 var fileReader; 12 var xhr;
13 function processMessage(event) { 13 function processMessage(event) {
14 if (event.data == "opened") { 14 if (event.data == "opened") {
15 fileReader = new w.FileReader(); 15 xhr = new w.XMLHttpRequest();
16 xhr.open('GET', 'http://user:pass@127.0.0.1:8000/doesNotExist', false);
16 w.close(); 17 w.close();
17 } else if (event.data == "closed") { 18 } else if (event.data == "closed") {
18 shouldThrow("fileReader.readAsArrayBuffer(new File(['hello'], 'world.htm l'))"); 19 shouldThrow("xhr.send()");
19 finishJSTest(); 20 finishJSTest();
20 } 21 }
21 } 22 }
22 23
23 if (window.testRunner) { 24 if (window.testRunner) {
24 testRunner.dumpAsText(); 25 testRunner.dumpAsText();
25 testRunner.setCanOpenWindows(); 26 testRunner.setCanOpenWindows();
26 } 27 }
27 w = window.open('../../resources/window-postmessage-open-close.html'); 28 w = window.open('../../resources/window-postmessage-open-close.html');
28 window.addEventListener("message", processMessage, false); 29 window.addEventListener("message", processMessage, false);
29 </script> 30 </script>
30 </body> 31 </body>
OLDNEW
« no previous file with comments | « no previous file | LayoutTests/fast/xmlhttprequest/xmlhttprequest-detached-mixedcontent-no-crash-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698