| 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.js"></script> | 7 <script src="/js-test-resources/js-test.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: Fail
ed to set the \'opener\' property on \'Window\': Blocked a frame with origin \\"
http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); |
| 16 finishJSTest(); | 16 finishJSTest(); |
| 17 }; | 17 }; |
| 18 </script> | 18 </script> |
| 19 </body> | 19 </body> |
| 20 </html> | 20 </html> |
| OLD | NEW |