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

Unified Diff: LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js

Issue 594803002: Transfer SecurityOrigin overrides to Workers. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rename transferPrivileges() to transferPrivilegesFrom() over security origins Created 6 years, 3 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
Index: LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js
diff --git a/LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js b/LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js
new file mode 100644
index 0000000000000000000000000000000000000000..597ba975776de260fad8c58595ce5e4141032f84
--- /dev/null
+++ b/LayoutTests/http/tests/xmlhttprequest/resources/insecure-xhr.js
@@ -0,0 +1,18 @@
+function finish() {
+ if (self.importScripts)
+ postMessage('done');
+ else if (window.opener)
+ window.opener.postMessage('done', '*');
+}
+
+var xhr = new XMLHttpRequest();
+xhr.open("GET", "http://localhost:8000/xmlhttprequest/resources/echo-request-origin.php");
+xhr.onload = function (e) {
+ console.log("PASS: " + xhr.responseText);
+ finish();
+};
+xhr.onerror = function (e) {
+ console.log("FAIL: " + xhr.status);
+ finish();
+};
+xhr.send();

Powered by Google App Engine
This is Rietveld 408576698