blob: 46c61b889a5b7be617790a755eab7106e9959d45 [file] [log] [blame]
if (typeof window === "undefined") {
// This test is meant to run in the browser, but it's easy to
// run it in the shell as well, even though it has no inner/outer
// windows.
window = this;
}
var res = false;
Object.defineProperty(this, "foo", {configurable: true,
get: function() { return this === window; },
set: function(v) { res = this === window; }});
(function() {
for (var i = 0; i < 3000; ++i) {
window.foo = i;
assertEq(res, true, "setter");
assertEq(window.foo, true, "getter");
}
})();
reportCompare(true, true);