| OLD | NEW |
| 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> |
| OLD | NEW |