| <link rel="stylesheet" href="../js/resources/js-test-style.css"> |
| <script src="../js/resources/js-test-pre.js"></script> |
| <script src="../js/resources/js-test-post-function.js"></script> |
| if (window.layoutTestController) { |
| layoutTestController.dumpAsText(); |
| layoutTestController.waitUntilDone(); |
| var iframeHasLoadedFirstPage = false; |
| if (!iframeHasLoadedFirstPage) { |
| iframeHasLoadedFirstPage = true; |
| shouldBe("document.getElementById('theFrame').contentDocument.baseURI", "'about:blank'"); |
| var iframe = document.getElementById('theFrame'); |
| iframe.src = "javascript:document.location.replace('./resources/iframe-no-src-set-location-pass.html')"; |
| shouldBe("document.getElementById('theFrame').contentDocument.body.innerHTML", "'PASS\\n'"); |
| if (window.layoutTestController) { |
| layoutTestController.notifyDone(); |
| description("This tests that an iframe with no src attribute uses the parent document's URL as a base when resolving non-fully-qualified URLs set by JavaScript."); |
| var successfullyParsed = true; |
| <iframe id="theFrame" onload="runTest()"></iframe> |