forked from WebKit/WebKit-http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Object-defineProperties-expected.txt
19 lines (14 loc) · 1.57 KB
/
Object-defineProperties-expected.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
Test to ensure correct behaviour of Object.defineProperties
On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
PASS Object.defineProperties() threw exception TypeError: Properties can only be defined on Objects..
PASS Object.defineProperties('a string') threw exception TypeError: Properties can only be defined on Objects..
PASS Object.defineProperties({}, 'a string') threw exception TypeError: Property description must be an object..
PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo', enumerable:true}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
PASS JSON.stringify(Object.defineProperties({},{property:{value:'foo'}, property2:{value:'foo', enumerable:true}})) is '{"property2":"foo"}'
PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo', enumerable:true}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo', enumerable:false}, property2:{value:'foo', enumerable:true}})) is '{"property2":"foo"}'
PASS JSON.stringify(Object.defineProperties({property:'foo'},{property:{value:'foo'}, property2:{value:'foo', enumerable:true}})) is '{"property":"foo","property2":"foo"}'
PASS Object.defineProperties(emptyObject, {foo:{value: true}, bar:{get:function(){}, writable:true}}) threw exception TypeError: Invalid property. 'writable' present on property with getter or setter..
PASS 'foo' in emptyObject is false
PASS successfullyParsed is true
TEST COMPLETE