blob: 1ff96e2dcc7d1d5198f97133b61172f5b2a80858 [file] [log] [blame]
<html>
<head>
<script src="resources/cross-frame-access.js"></script>
</head>
<body>
<iframe src="http://localhost:8000/security/resources/cross-frame-iframe-for-get-test.html" style=""></iframe>
<pre id="console"></pre>
<script>
window.targetWindow = frames[0];
window.onload = function()
{
if (window.testRunner)
testRunner.dumpAsText();
log("\n----- tests for getting/setting interesting properties -----\n");
// built-in property
shouldBeFalse("canGet('targetWindow.Object')");
shouldBeFalse("canSet('targetWindow.Object')");
// pre-existing custom property
shouldBeFalse("canGet('targetWindow.existingCustomProperty')");
shouldBeFalse("canSet('targetWindow.existingCustomProperty')");
// new custom property
shouldBeFalse("canSet('targetWindow.newCustomProperty')");
// built-in prototype property
shouldBeFalse("canGet('targetWindow.hasOwnProperty')");
shouldBeFalse("canSet('targetWindow.hasOwnProperty')");
// custom prototype property
shouldBeFalse("canGet('targetWindow.windowPrototypeCustomProperty')");
shouldBeFalse("canSet('targetWindow.windowPrototypeCustomProperty')");
shouldBeFalse("canGet('targetWindow.objectPrototypeCustomProperty')");
shouldBeFalse("canSet('targetWindow.objectPrototypeCustomProperty')");
// window object itself
shouldBeFalse("canGet('targetWindow.toString')");
shouldBeFalse("canSet('targetWindow.toString')");
shouldBe("toString('targetWindow')", "'[exception]'");
}
</script>
</body>
</html>