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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html

Issue 1253343002: [XHR] Tidy up files for testing XHR's error for mixed content check failure (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase Created 4 years, 10 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 <script> 1 <script>
2 function report(message) {
3 window.opener.postMessage(message, '*');
4 }
5
2 var xhr = new XMLHttpRequest(); 6 var xhr = new XMLHttpRequest();
3 xhr.onload = function() 7 xhr.onload = function() {
4 { 8 report('FAIL: XHR succeeded unexpectedly');
5 window.opener.postMessage('FAIL: XHR succeeded unexpectedly', '*'); 9 }
6 }; 10 xhr.onerror = function() {
7 xhr.onerror = function() 11 report('DONE');
8 {
9 window.opener.postMessage('DONE', '*');
10 }; 12 };
11 xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control- allow-lists.php?origin=*", true); 13 xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control- allow-lists.php?origin=*", true);
12 xhr.send("foo"); 14 xhr.send("foo");
13 </script> 15 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698