blob: ee38b84bd85d3561b7c141807b6ef03f1e414236 [file] [log] [blame]
<html>
<head>
<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>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.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.layoutTestController) {
layoutTestController.notifyDone();
}
}
}
</script>
</head>
<body>
<p id="description"></p>
<div id="console"></div>
<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.");
var successfullyParsed = true;
</script>
<iframe id="theFrame" onload="runTest()"></iframe>
</body>
</html>