blob: 9ffab98f31503f4934f20c7b2c5d30ac7b20d7df [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', 'NOTALLOWED')", "'NOTALLOWED'");
// Work around DRT bug that causes subsequent tests to fail.
window.stop();
}
</script>
</body>
</html>