blob: fc9b49181a60dbf9d433c7d7a27ed5b41fb21060 [file] [log] [blame]
<!DOCTYPE html>
<html>
<body>
<script src="../../resources/js-test-pre.js"></script>
<script>
description("Tests what happens when you make prototype chain accesses with impure GetOwnPropertySlot traps in the way.");
Document.prototype.foo = function () {};
function f() {
return document.foo;
}
var expected = "\"function\"";
for (var i = 0; i < 50; ++i) {
if (i == 45) {
var img = new Image();
img.name = "foo";
document.body.appendChild(img);
expected = "\"object\"";
}
v = f();
shouldBe("typeof f()", expected);
}
</script>
<script src="../../resources/js-test-post.js"></script>
</body>
</html>