<html>
<head>
<script src="../../../resources/js-test.js"></script>
<script>
var childWindow;
var propertiesToVerify = [];
function runTest()
{
description("Tests that getting and setting name and opener on a cached DOMWindow after the associated frame is removed from a web page does not crash.");
var frame = document.getElementById("frame");
childWindow = frame.contentWindow;
childWindow.name = "oldname";
shouldBe("childWindow.name", "'oldname'");
frame.parentNode.removeChild(frame);
childWindow.opener = null;
shouldBeNull("childWindow.opener");
childWindow.name = "newname";
shouldBe("childWindow.name", "''");
}
</script>
</head>
<body>
<iframe id="frame" src="about:blank" onload="runTest()"></iframe>
</body>
</html>