blob: 3d2386c93aef85ed9069b351b4de89d4d2e833f3 [file] [log] [blame]
<html>
<head>
<script src="../../resources/js-test-pre.js"></script>
<script>
if (window.testRunner) {
testRunner.dumpAsText();
testRunner.waitUntilDone();
}
var iframeHasLoadedFirstPage = false;
function runTest()
{
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')";
} else {
shouldBe("document.getElementById('theFrame').contentDocument.body.innerHTML", "'PASS\\n'");
isSuccessfullyParsed();
if (window.testRunner) {
testRunner.notifyDone();
}
}
}
</script>
</head>
<body>
<script>
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.");
</script>
<iframe id="theFrame" onload="runTest()"></iframe>
</body>
</html>