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

Unified Diff: LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php

Issue 1180923003: Add window access checks for Suborigins (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Fix tests on Windows Created 5 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/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php
diff --git a/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php b/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php
index 1523b08ef05895ae660ee58b3d08a8932b12c17f..8eab860745652291c736e971dc2f2a5082253d6b 100644
--- a/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php
+++ b/LayoutTests/http/tests/security/suborigins/suborigin-blocked-not-in-suborigin-to-suborigin.php
@@ -6,18 +6,10 @@
<script src="/resources/testharnessreport.js"></script>
</head>
<script>
-window.onmessage = function() {
- var iframe = document.getElementById('iframe');
- var secret = '';
- try {
- secret = iframe.contentWindow.secret;
- assert_unreached();
- done();
- } catch(e) {
- assert_equals(secret, "", "The parent frame should not be able to get the secret value from the child iframe.");
- done();
- };
+window.onmessage = function (event) {
+ assert_equals(event.data, 'SecurityError: Blocked a frame with origin \"http://127.0.0.1:8000\" from accessing a cross-origin frame.');
+ done();
};
</script>
-<iframe id="iframe" src="resources/childsuborigin.php?suborigin=foobar"></iframe>
+<iframe src="resources/reach-into-iframe.php?childsuborigin=foobar"></iframe>
</html>

Powered by Google App Engine
This is Rietveld 408576698