blob: 6f6350b93adc585fb367b96bf6d31ec05cbe8569 [file] [log] [blame]
This test ensures that properties on an object literal are put directly onto the created object, and don't call setters in the prototype chain.
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS ({a:true}).a is true
PASS ({__proto__: {a:false}, a:true}).a is true
PASS ({__proto__: {set a(x) {throw 'Should not call setter'; }}, a:true}).a is true
PASS ({__proto__: {get a() {throw 'Should not reach getter'; }}, a:true}).a is true
PASS ({__proto__: {get a() {throw 'Should not reach getter'; }, b:true}, a:true}).b is true
PASS ({__proto__: {__proto__: {a:false}}, a:true}).a is true
PASS ({__proto__: {__proto__: {set a(x) {throw 'Should not call setter'; }}}, a:true}).a is true
PASS ({__proto__: {__proto__: {get a() {throw 'Should not reach getter'; }}}, a:true}).a is true
PASS ({__proto__: {__proto__: {get a() {throw 'Should not reach getter'; }, b:true}}, a:true}).b is true
PASS successfullyParsed is true
TEST COMPLETE