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

Unified Diff: LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js

Issue 351163002: Prevent sandboxed iframes from bypassing WebSocket mixed content checks. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Test. Created 6 years, 6 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/security/mixedContent/websocket/resources/expect-throw-on-construction.js
diff --git a/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js
index 2dd025a109c1b1224be061bfc42cfe1b65c98fb5..e39cf14395ab33a1771bf91638f64eba3912f866 100644
--- a/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js
+++ b/LayoutTests/http/tests/security/mixedContent/websocket/resources/expect-throw-on-construction.js
@@ -1,6 +1,8 @@
function reportResult(msg) {
- if ("opener" in self)
+ if (self.opener)
self.opener.postMessage(msg, "*");
+ else if (self.top)
+ self.top.postMessage(msg, "*");
else
postMessage(msg);
}

Powered by Google App Engine
This is Rietveld 408576698