blob: 25da16282c226b1474b5329d453eaf806f546e83 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
<html>
<head>
<link rel="stylesheet" href="../../js/resources/js-test-style.css">
<script src="../../js/resources/js-test-pre.js"></script>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.waitUntilDone();
}
var updatedFrameURL = "data:text/html,Updated contents of iframe";
var updatedObjectURL = "data:text/html,Updated contents of object";
function runTests()
{
shouldBe("window.frames.length", "2");
shouldBe("window.frames[0].frameElement.name", '"frame"');
shouldBe("window.frames[1].frameElement.name", '"obj"');
debug("Loading '" + updatedFrameURL + "' in iframe...");
debug("Loading '" + updatedObjectURL + "' in object...");
open(updatedFrameURL, "frame");
open(updatedObjectURL, "obj");
setTimeout("runMoreTests()", 200);
}
function runMoreTests()
{
shouldBe("window.frames[0].location.toString()", '"' + updatedFrameURL + '"');
shouldBe("window.frames[1].location.toString()", '"' + updatedObjectURL + '"');
if (window.layoutTestController) {
layoutTestController.notifyDone();
}
}
</script>
</head>
<body onload="runTests()">
<p id="description"></p>
<div id="console"></div>
<iframe name="frame" src="data:text/html,Old contents of iframe"></iframe>
<object name="obj" type="text/html" data="data:text/html,New contents of frame"></object>
</body>
</html>