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

Side by Side 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 unified diff | Download patch
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <html> 2 <html>
3 <head> 3 <head>
4 <title>Block frame not in suborigin from accessing a frame in a suborigin</title > 4 <title>Block frame not in suborigin from accessing a frame in a suborigin</title >
5 <script src="/resources/testharness.js"></script> 5 <script src="/resources/testharness.js"></script>
6 <script src="/resources/testharnessreport.js"></script> 6 <script src="/resources/testharnessreport.js"></script>
7 </head> 7 </head>
8 <script> 8 <script>
9 window.onmessage = function() { 9 window.onmessage = function (event) {
10 var iframe = document.getElementById('iframe'); 10 assert_equals(event.data, 'SecurityError: Blocked a frame with origin \"http ://127.0.0.1:8000\" from accessing a cross-origin frame.');
11 var secret = ''; 11 done();
12 try {
13 secret = iframe.contentWindow.secret;
14 assert_unreached();
15 done();
16 } catch(e) {
17 assert_equals(secret, "", "The parent frame should not be able to get th e secret value from the child iframe.");
18 done();
19 };
20 }; 12 };
21 </script> 13 </script>
22 <iframe id="iframe" src="resources/childsuborigin.php?suborigin=foobar"></iframe > 14 <iframe src="resources/reach-into-iframe.php?childsuborigin=foobar"></iframe>
23 </html> 15 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698