Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(41)

Side by Side Diff: test/webkit/fast/js/Object-defineProperty-expected.txt

Issue 1381083004: Improving error messages when adding properties to non JSObject receiver in (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: removing unused branch Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « test/mjsunit/messages.js ('k') | test/webkit/fast/js/basic-strict-mode-expected.txt » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2013 the V8 project authors. All rights reserved. 1 # Copyright 2013 the V8 project authors. All rights reserved.
2 # Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved. 2 # Copyright (C) 2005, 2006, 2007, 2008, 2009 Apple Inc. All rights reserved.
3 # 3 #
4 # Redistribution and use in source and binary forms, with or without 4 # Redistribution and use in source and binary forms, with or without
5 # modification, are permitted provided that the following conditions 5 # modification, are permitted provided that the following conditions
6 # are met: 6 # are met:
7 # 1. Redistributions of source code must retain the above copyright 7 # 1. Redistributions of source code must retain the above copyright
8 # notice, this list of conditions and the following disclaimer. 8 # notice, this list of conditions and the following disclaimer.
9 # 2. Redistributions in binary form must reproduce the above copyright 9 # 2. Redistributions in binary form must reproduce the above copyright
10 # notice, this list of conditions and the following disclaimer in the 10 # notice, this list of conditions and the following disclaimer in the
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:function(){return 13;}}); o.foo = 42; o.result; is 42 131 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:function(){return 13;}}); o.foo = 42; o.result; is 42
132 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:undefined}); o.foo is undefined 132 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:undefined}); o.foo is undefined
133 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:undefined}); o.foo = 42; o.result; is 42 133 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {get:undefined}); o.foo = 42; o.result; is 42
134 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:function(){this.result = 13;}}); o.foo is 42 134 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:function(){this.result = 13;}}); o.foo is 42
135 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:function(){this.result = 13;}}); o.foo = 42; o.result; is 13 135 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:function(){this.result = 13;}}); o.foo = 42; o.result; is 13
136 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:undefined}); o.foo is 42 136 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:undefined}); o.foo is 42
137 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:undefined}); o.foo = 42; o.result; threw exception TypeError: Cannot set pr operty foo of #<Object> which has only a getter. 137 PASS 'use strict'; var o = Object.defineProperty(Object.defineProperty({foo:1}, 'foo', {get:function(){return 42;}, set:function(x){this.result = x;}}), 'foo', {set:undefined}); o.foo = 42; o.result; threw exception TypeError: Cannot set pr operty foo of #<Object> which has only a getter.
138 PASS 0 in Object.prototype is true 138 PASS 0 in Object.prototype is true
139 PASS '0' in Object.prototype is true 139 PASS '0' in Object.prototype is true
140 PASS var o = {}; o.readOnly = false; o.readOnly is true 140 PASS var o = {}; o.readOnly = false; o.readOnly is true
141 PASS 'use strict'; var o = {}; o.readOnly = false; o.readOnly threw exception Ty peError: Cannot assign to read only property 'readOnly' of #<Object>. 141 PASS 'use strict'; var o = {}; o.readOnly = false; o.readOnly threw exception Ty peError: Cannot assign to read only property 'readOnly' of object '#<Object>'.
142 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false}), 'foo').writable is false 142 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false}), 'foo').writable is false
143 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false, writable: false}), 'foo').writable is false 143 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false, writable: false}), 'foo').writable is false
144 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false, writable: true}), 'foo').writable is true 144 PASS Object.getOwnPropertyDescriptor(Object.defineProperty(Object.defineProperty ({}, 'foo', {get: function() { return false; }, configurable: true}), 'foo', {va lue:false, writable: true}), 'foo').writable is true
145 PASS var a = Object.defineProperty([], 'length', {writable: false}); a[0] = 42; 0 in a; is false 145 PASS var a = Object.defineProperty([], 'length', {writable: false}); a[0] = 42; 0 in a; is false
146 PASS 'use strict'; var a = Object.defineProperty([], 'length', {writable: false} ); a[0] = 42; 0 in a; threw exception TypeError: Cannot assign to read only prop erty 'length' of [object Array]. 146 PASS 'use strict'; var a = Object.defineProperty([], 'length', {writable: false} ); a[0] = 42; 0 in a; threw exception TypeError: Cannot assign to read only prop erty 'length' of object '[object Array]'.
147 PASS var a = Object.defineProperty([42], '0', {writable: false}); a[0] = false; a[0]; is 42 147 PASS var a = Object.defineProperty([42], '0', {writable: false}); a[0] = false; a[0]; is 42
148 PASS 'use strict'; var a = Object.defineProperty([42], '0', {writable: false}); a[0] = false; a[0]; threw exception TypeError: Cannot assign to read only proper ty '0' of [object Array]. 148 PASS 'use strict'; var a = Object.defineProperty([42], '0', {writable: false}); a[0] = false; a[0]; threw exception TypeError: Cannot assign to read only proper ty '0' of object '[object Array]'.
149 PASS var a = Object.defineProperty([], '0', {set: undefined}); a[0] = 42; a[0]; is undefined. 149 PASS var a = Object.defineProperty([], '0', {set: undefined}); a[0] = 42; a[0]; is undefined.
150 PASS 'use strict'; var a = Object.defineProperty([], '0', {set: undefined}); a[0 ] = 42; a[0]; threw exception TypeError: Cannot set property 0 of [object Array] which has only a getter. 150 PASS 'use strict'; var a = Object.defineProperty([], '0', {set: undefined}); a[0 ] = 42; a[0]; threw exception TypeError: Cannot set property 0 of [object Array] which has only a getter.
151 PASS anObj.slot1 is "foo" 151 PASS anObj.slot1 is "foo"
152 PASS anObj.slot2 is "bar" 152 PASS anObj.slot2 is "bar"
153 PASS anObj.propertyIsEnumerable('slot1') is true 153 PASS anObj.propertyIsEnumerable('slot1') is true
154 PASS anObj.propertyIsEnumerable('slot2') is false 154 PASS anObj.propertyIsEnumerable('slot2') is false
155 PASS anObj.slot4 is "goo" 155 PASS anObj.slot4 is "goo"
156 PASS anObj.slot5 is 123 156 PASS anObj.slot5 is 123
157 PASS anObj._Slot5 is 123 157 PASS anObj._Slot5 is 123
158 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5') is undefined. 158 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5') is undefined.
159 PASS anObj.slot5 is 456 159 PASS anObj.slot5 is 456
160 PASS anObj._Slot5 is 123 160 PASS anObj._Slot5 is 123
161 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5').value is 456 161 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5').value is 456
162 PASS anObj.slot1 is "foo" 162 PASS anObj.slot1 is "foo"
163 PASS anObj.slot2 is "bar" 163 PASS anObj.slot2 is "bar"
164 PASS anObj.propertyIsEnumerable('slot1') is true 164 PASS anObj.propertyIsEnumerable('slot1') is true
165 PASS anObj.propertyIsEnumerable('slot2') is false 165 PASS anObj.propertyIsEnumerable('slot2') is false
166 PASS anObj.slot4 is "goo" 166 PASS anObj.slot4 is "goo"
167 PASS anObj.slot5 is 123 167 PASS anObj.slot5 is 123
168 PASS anObj._Slot5 is 123 168 PASS anObj._Slot5 is 123
169 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5') is undefined. 169 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5') is undefined.
170 PASS anObj.slot5 is 456 170 PASS anObj.slot5 is 456
171 PASS anObj._Slot5 is 123 171 PASS anObj._Slot5 is 123
172 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5').value is 456 172 PASS Object.getOwnPropertyDescriptor(anObj, 'slot5').value is 456
173 PASS successfullyParsed is true 173 PASS successfullyParsed is true
174 174
175 TEST COMPLETE 175 TEST COMPLETE
176 176
OLDNEW
« no previous file with comments | « test/mjsunit/messages.js ('k') | test/webkit/fast/js/basic-strict-mode-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698