blob: b980127c7937403a864c072d1fe7be0b2354e069 [file] [log] [blame]
<!DOCTYPE html>
<body onload="runTest()">
<script src="../resources/js-test-pre.js"></script>
<script>
description("Tests that calling an instance property getter on another instance works as expected");
jsTestIsAsync = true;
function runTest()
{
otherWindow = window.open("about:blank");
locationGetter = Object.getOwnPropertyDescriptor(otherWindow.document, "location").get;
shouldBeTrue("locationGetter instanceof otherWindow.Function");
shouldBeEqualToString("locationGetter.call(otherWindow.document).toString()", "about:blank");
// Should return the current document's location.
shouldBeTrue("locationGetter.call(window.document) === window.document.location");
finishJSTest();
}
</script>
<script src="../resources/js-test-post.js"></script>
</body>