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

Unified Diff: third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js

Issue 1760523004: CORS-RFC1918: Teach Workers about address spaces. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js
diff --git a/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js b/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js
index 90672715c9a1097a2f4a5f604e570c6a0c2ad49f..9522e0eda3583d47ddb1f0f9772f7454b90f8fc5 100644
--- a/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js
+++ b/third_party/WebKit/LayoutTests/http/tests/security/cors-rfc1918/resources/post-addressspace-to-owner.js
@@ -1,6 +1,18 @@
+// Dedicated workers.
onmessage = function () {
postMessage({
"origin": self.location.origin,
"addressSpace": self.addressSpace
});
}
+
+// Shared workers.
+onconnect = function (e) {
+ var port = e.ports[0];
+ port.onmessage = function () {
+ port.postMessage({
+ "origin": self.location.origin,
+ "addressSpace": self.addressSpace
+ });
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698