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

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

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

Powered by Google App Engine
This is Rietveld 408576698