| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Flags: --harmony-object-values-entries --harmony-proxies --harmony-reflect | 5 // Flags: --harmony-object-values-entries |
| 6 // Flags: --allow-natives-syntax | 6 // Flags: --allow-natives-syntax |
| 7 | 7 |
| 8 function TestMeta() { | 8 function TestMeta() { |
| 9 assertEquals(1, Object.values.length); | 9 assertEquals(1, Object.values.length); |
| 10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.values)); | 10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.values)); |
| 11 assertEquals("values", Object.values.name); | 11 assertEquals("values", Object.values.name); |
| 12 | 12 |
| 13 var descriptor = Object.getOwnPropertyDescriptor(Object, "values"); | 13 var descriptor = Object.getOwnPropertyDescriptor(Object, "values"); |
| 14 assertTrue(descriptor.writable); | 14 assertTrue(descriptor.writable); |
| 15 assertFalse(descriptor.enumerable); | 15 assertFalse(descriptor.enumerable); |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 Object.defineProperty(this, "b", { enumerable: true }); | 220 Object.defineProperty(this, "b", { enumerable: true }); |
| 221 return 1; | 221 return 1; |
| 222 }, | 222 }, |
| 223 enumerable: true | 223 enumerable: true |
| 224 }); | 224 }); |
| 225 Object.defineProperty(aMakesBEnumerable, "b", { | 225 Object.defineProperty(aMakesBEnumerable, "b", { |
| 226 value: 2, configurable:true, enumerable: false }); | 226 value: 2, configurable:true, enumerable: false }); |
| 227 assertEquals([1, 2], Object.values(aMakesBEnumerable)); | 227 assertEquals([1, 2], Object.values(aMakesBEnumerable)); |
| 228 } | 228 } |
| 229 TestMutateDuringEnumeration(); | 229 TestMutateDuringEnumeration(); |
| OLD | NEW |