blob: 6a5b4b1fd0bc096aaabb29bb9d0aa716cf62b979 [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()
{
shouldBe("document.getElementById('theFrame').contentDocument.baseURI", "'about:blank'");
var frameDoc = document.getElementById('theFrame').contentWindow.document;
var innerFrame = frameDoc.createElement("iframe");
innerFrame.src = "resources/iframe-no-src-set-location-pass.html";
innerFrame.id = "innerFrame";
innerFrame.onload = function() {
shouldBe("document.getElementById('theFrame').contentDocument.getElementById('innerFrame').contentDocument.body.innerHTML", "'PASS\\n'");
isSuccessfullyParsed();
if (window.testRunner)
testRunner.notifyDone();
}
frameDoc.body.appendChild(innerFrame);
}
</script>
</head>
<body>
<script>
description("This tests that an iframe with no src attribute uses the parent document's origin when resolving links inserted into the frame via JavaScript.");
</script>
<iframe id="theFrame" onload="runTest()"></iframe>
</body>
</html>