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

Side by Side Diff: LayoutTests/http/tests/security/suborigins/suborigin-in-meta-disallowed.html

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>Suborigin in &lt;meta&gt; disallowed</title>
5 <script src="../../resources/testharness.js"></script>
6 <script src="../../resources/testharnessreport.js"></script>
7 <meta http-equiv="Content-Security-Policy" content="suborigin foobar"> 4 <meta http-equiv="Content-Security-Policy" content="suborigin foobar">
5 <title>The &lt;meta&gt; tag does not allow a page to enter a suborigin.< /title>
6 <script src="/resources/testharness.js"></script>
7 <script src="/resources/testharnessreport.js"></script>
8 </head> 8 </head>
9 <body> 9 <script>
10 <script>done()</script> 10 window.onmessage = function(event) {
11 </body> 11 var secret;
12 try {
13 secret = document.getElementById('iframe').contentWindow.secret;
14 } catch(e) {
15 secret = '' + e;
16 }
17 assert_equals(secret, 'SecurityError: Blocked a frame with origin \"http ://127.0.0.1:8000\" from accessing a cross-origin frame.');
18 done();
19 };
20 </script>
21 <iframe id="iframe" src="resources/post-to-parent.php?suborigin=foobar"></if rame>
12 </html> 22 </html>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698