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

Unified 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: Revert blank line addition 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-async-post-xhr-blocked-expected.txt ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html b/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html
index 8b205949a163b43cf132ad0b23a3d7e43b30b009..a465b94e7e7dd27823e6f14d542d74d323401a39 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html
+++ b/third_party/WebKit/LayoutTests/http/tests/security/mixedContent/resources/frame-with-insecure-async-xhr-post.html
@@ -1,12 +1,14 @@
<script>
+function report(message) {
+ window.opener.postMessage(message, '*');
+}
+
var xhr = new XMLHttpRequest();
-xhr.onload = function()
-{
- window.opener.postMessage('FAIL: XHR succeeded unexpectedly', '*');
-};
-xhr.onerror = function()
-{
- window.opener.postMessage('DONE', '*');
+xhr.onload = function() {
+ report('FAIL: XHR succeeded unexpectedly');
+}
+xhr.onerror = function() {
+ report('DONE');
};
xhr.open("POST", "http://127.0.0.1:8000/xmlhttprequest/resources/access-control-allow-lists.php?origin=*", true);
xhr.send("foo");
« no previous file with comments | « third_party/WebKit/LayoutTests/http/tests/security/mixedContent/insecure-async-post-xhr-blocked-expected.txt ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698