blob: c7584fbaa316f8512b8a21b75cd628bc6741e9c0 [file] [log] [blame]
<!DOCTYPE html>
<script src="../../../resources/js-test-pre.js"></script>
<div id="div"></div>
<iframe name="f"></iframe>
<a href="http://webkit.org" name="a"></a>
<script>
window.x = 1;
Object.getPrototypeOf(window).y = 2;
</script>
<script>
shouldBeTrue('window.hasOwnProperty("Element")');
shouldBeTrue('window.hasOwnProperty("x")');
shouldBeFalse('window.hasOwnProperty("y")');
shouldBeFalse('window.hasOwnProperty("f")');
shouldBeTrue('window.__proto__.__proto__.hasOwnProperty("f")');
shouldBeFalse('window.hasOwnProperty("div")');
shouldBeTrue('window.__proto__.__proto__.hasOwnProperty("div")');
shouldBeFalse('window.hasOwnProperty("a")');
</script>
<script>
var Element;
shouldNotBe('Element', 'undefined');
var x;
shouldBe('x', '1');
var y;
shouldBeUndefined('y');
var f;
shouldBeUndefined('f');
var div;
shouldBeUndefined('div');
var a;
shouldBeUndefined('a');
</script>
<script src="../../../resources/js-test-post.js"></script>