OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 </head> | 4 </head> |
5 <body> | 5 <body> |
6 <iframe src="http://localhost:8080/"></iframe> | 6 <iframe src="http://localhost:8080/"></iframe> |
7 <script src="/js-test-resources/js-test-pre.js"></script> | 7 <script src="/js-test-resources/js-test-pre.js"></script> |
8 <script> | 8 <script> |
9 description("Cross-origin access to 'window.open' and 'window.opener' sh
ould throw a SecurityError."); | 9 description("Cross-origin access to 'window.open' and 'window.opener' sh
ould throw a SecurityError."); |
10 | 10 |
11 window.jsTestIsAsync = true; | 11 window.jsTestIsAsync = true; |
12 var frame = document.querySelector('iframe'); | 12 var frame = document.querySelector('iframe'); |
13 window.onload = function () { | 13 window.onload = function () { |
14 shouldThrow("frame.contentWindow.open()", '"SecurityError: Blocked a
frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fra
me."'); | 14 shouldThrow("frame.contentWindow.open()", '"SecurityError: Blocked a
frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origin fra
me."'); |
15 shouldThrow("frame.contentWindow.opener = 1;", '"SecurityError: Bloc
ked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origi
n frame."'); | 15 shouldThrow("frame.contentWindow.opener = 1;", '"SecurityError: Bloc
ked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-origi
n frame."'); |
16 finishJSTest(); | 16 finishJSTest(); |
17 }; | 17 }; |
18 </script> | 18 </script> |
19 <script src="/js-test-resources/js-test-post.js"></script> | |
20 </body> | 19 </body> |
21 </html> | 20 </html> |
OLD | NEW |