blob: c7341933ab63025b751f9365674289beca402131 [file] [log] [blame]
Tests that check that sloppy getters and setters on the global object don't coerce undefined to their this.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS this.__proto__ accessed succesfully and stayed frozen.
PASS Object.prototype.valueOf.call(3); did not throw exception.
PASS Object.prototype.valueOf.call(null); threw exception TypeError: null is not an object (evaluating 'Object.prototype.valueOf.call(null)').
PASS Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').get() did not throw exception.
PASS Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set(['foo']) did not throw exception.
PASS (0,Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').get)() threw exception TypeError: Can't convert undefined or null to object.
PASS (0,Object.getOwnPropertyDescriptor(Object.prototype,'__proto__').set)(['foo']) threw exception TypeError: Can't convert undefined or null to object.
PASS top_level_sloppy_getter(); did not throw exception.
PASS top_level_sloppy_setter(['foo']); threw exception TypeError: Cannot set prototype of this object.
PASS successfullyParsed is true
TEST COMPLETE