| OLD | NEW |
| 1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
| 2 <html> | 2 <html> |
| 3 <head> | 3 <head> |
| 4 <title>Suborigin in <meta> 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 <meta> 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> |
| OLD | NEW |