| <!DOCTYPE html> |
| <html> |
| <head> |
| <script src="/js-test-resources/js-test.js"></script> |
| </head> |
| <body onload="runTest()"> |
| <iframe id="crossOriginFrame" src="http://localhost:8000/security/resources/reify-window.html"></iframe> |
| <script> |
| description("Tests that window.location can be set cross-origin even if the window object is reified."); |
| jsTestIsAsync = true; |
| |
| function runTest() |
| { |
| crossOriginWindow = document.getElementById("crossOriginFrame").contentWindow; |
| shouldThrow("crossOriginWindow.location.href"); |
| shouldNotThrow("crossOriginWindow.location = 'about:blank'"); |
| shouldThrow("crossOriginWindow.location.href"); |
| handle = setInterval(function() { |
| try { |
| crossOriginWindow.location.href; |
| shouldBeEqualToString("crossOriginWindow.location.href", "about:blank"); |
| clearInterval(handle); |
| finishJSTest(); |
| } catch(e) { } |
| }, 5); |
| } |
| </script> |
| </body> |
| </html> |