Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <html> | 1 <html> |
| 2 <head> | 2 <head> |
| 3 <script src="/js-test-resources/js-test.js"></script> | 3 <script src="/js-test-resources/js-test.js"></script> |
| 4 <script src="resources/cross-frame-access.js"></script> | 4 <script src="resources/cross-frame-access.js"></script> |
| 5 </head> | 5 </head> |
| 6 <body> | 6 <body> |
| 7 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe> | 7 <iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get -test.html" style=""></iframe> |
| 8 <pre id="console"></pre> | 8 <pre id="console"></pre> |
| 9 <script> | 9 <script> |
| 10 | 10 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 52 shouldThrow("window.resizeTo.call(targetWindow, 0, 0);", '"SecurityError: Fa iled to execute \'resizeTo\' on \'Window\': Blocked a frame with origin \\"http: //127.0.0.1:8000\\" from accessing a cross-origin frame."'); | 52 shouldThrow("window.resizeTo.call(targetWindow, 0, 0);", '"SecurityError: Fa iled to execute \'resizeTo\' on \'Window\': Blocked a frame with origin \\"http: //127.0.0.1:8000\\" from accessing a cross-origin frame."'); |
| 53 shouldThrow("window.addEventListener.call(targetWindow, 'load', null, false) ;", '"SecurityError: Failed to execute \'addEventListener\' on \'EventTarget\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-o rigin frame."'); | 53 shouldThrow("window.addEventListener.call(targetWindow, 'load', null, false) ;", '"SecurityError: Failed to execute \'addEventListener\' on \'EventTarget\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a cross-o rigin frame."'); |
| 54 shouldThrow("window.removeEventListener.call(targetWindow, 'load', null, fal se);", '"SecurityError: Failed to execute \'removeEventListener\' on \'EventTarg et\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a c ross-origin frame."'); | 54 shouldThrow("window.removeEventListener.call(targetWindow, 'load', null, fal se);", '"SecurityError: Failed to execute \'removeEventListener\' on \'EventTarg et\': Blocked a frame with origin \\"http://127.0.0.1:8000\\" from accessing a c ross-origin frame."'); |
| 55 | 55 |
| 56 // Throws an EvalError and logs to the error console | 56 // Throws an EvalError and logs to the error console |
| 57 shouldBe("window.eval.call(targetWindow, '1+2');", '3'); | 57 shouldBe("window.eval.call(targetWindow, '1+2');", '3'); |
| 58 | 58 |
| 59 // - Tests for the Location object - | 59 // - Tests for the Location object - |
| 60 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Failed to execute \'toString\' on \'Location\': Blocked a frame with or igin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); | 60 shouldThrow("window.location.toString.call(targetWindow.location)", '"Securi tyError: Failed to execute \'toString\' on \'Location\': Blocked a frame with or igin \\"http://127.0.0.1:8000\\" from accessing a cross-origin frame."'); |
| 61 | 61 |
| 62 // Work around DRT bug that causes subsequent tests to fail. | |
|
dcheng
2014/10/20 18:35:14
o.O
| |
| 63 window.stop(); | |
| 64 finishJSTest(); | 62 finishJSTest(); |
| 65 } | 63 } |
| 66 </script> | 64 </script> |
| 67 </body> | 65 </body> |
| 68 </html> | 66 </html> |
| OLD | NEW |