blob: 1e00e68a64085525e0825f526db2d750833c1a97 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../../resources/js-test-pre.js"></script>
<iframe id="testFrame" src="about:blank"></iframe>
<script>
description("Tests that calling Object.getOwnPropertyDescriptor() on a sub-frame's window works as expected");
otherWindow = frames[0];
evalAndLog("descriptor = Object.getOwnPropertyDescriptor(otherWindow, 'location')");
shouldNotBe("descriptor", "undefined");
shouldBeTrue("descriptor.get instanceof otherWindow.Function");
shouldBeTrue("descriptor.set instanceof otherWindow.Function");
shouldBeTrue("descriptor.enumerable");
shouldBeFalse("descriptor.configurable");
shouldBeEqualToString("descriptor.get.call(otherWindow).toString()", "about:blank");
shouldBe("descriptor.get.call()", "descriptor.get.call(otherWindow)");
</script>
<script src="../../../resources/js-test-post.js"></script>
</body>
<html>