| <script src="/js-test-resources/js-test.js"></script> |
| description("Checks that a cross origin iframe can be navigated using location.replace()."); |
| if (window.testRunner && testRunner.setShouldDecideNavigationPolicyAfterDelay) |
| testRunner.setShouldDecideNavigationPolicyAfterDelay(true); |
| addEventListener("message", function() { |
| testPassed("Navigated cross-origin frame via Location.replace"); |
| shouldBeEqualToString("window.frames['crossDomainFrame'].location.href", "http://127.0.0.1:8000/security/resources/postMessage.html"); |
| window.frames['crossDomainFrame'].location.replace("http://127.0.0.1:8000/security/resources/postMessage.html"); |
| testFailed("Failed to navigate cross-origin frame via Location.replace"); |
| <iframe id="crossDomainFrame" name="crossDomainFrame" src="http://localhost:8000/misc/resources/failure.html"></iframe> |
| http://bugs.webkit.org/show_bug.cgi?id=11230 |