blob: e34f6f41fe212ffd8f7486b0f77ef9a3a00dd6fb [file] [log] [blame]
<html>
<head>
<script src="cross-frame-access.js"></script>
<script>
receiver = function(e)
{
if (e.data == "deletingValuesComplete")
setCheck();
}
document.addEventListener('message', receiver, false);
window.onload = function()
{
window.existingProperty = "test value";
window[1] = "test value";
window.history.existingProperty = "test value";
window.history[1] = "test value";
window.location.existingProperty = "test value";
window.location[1] = "test value";
window.parent.postMessage("setValuesComplete");
}
setCheck = function()
{
log("\n----- tests for deleting the properties of window, window.history, and window.location cross-domain -----\n");
shouldBe("window.existingProperty", "'test value'");
shouldBe("window[1]", "'test value'");
shouldBe("window.history.existingProperty", "'test value'");
shouldBe("window.history[1]", "'test value'");
shouldBe("window.location.existingProperty", "'test value'");
shouldBe("window.location[1]", "'test value'");
if (window.layoutTestController)
layoutTestController.notifyDone();
}
</script>
</head>
<body>
<pre id="console"></pre>
</body>
</html>