| 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.entries.length); | 9 assertEquals(1, Object.entries.length); |
| 10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.entries)); | 10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.entries)); |
| 11 assertEquals("entries", Object.entries.name); | 11 assertEquals("entries", Object.entries.name); |
| 12 | 12 |
| 13 var descriptor = Object.getOwnPropertyDescriptor(Object, "entries"); | 13 var descriptor = Object.getOwnPropertyDescriptor(Object, "entries"); |
| 14 assertTrue(descriptor.writable); | 14 assertTrue(descriptor.writable); |
| 15 assertFalse(descriptor.enumerable); | 15 assertFalse(descriptor.enumerable); |
| (...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 240 Object.defineProperty(this, "b", { enumerable: true }); | 240 Object.defineProperty(this, "b", { enumerable: true }); |
| 241 return 1; | 241 return 1; |
| 242 }, | 242 }, |
| 243 enumerable: true | 243 enumerable: true |
| 244 }); | 244 }); |
| 245 Object.defineProperty(aMakesBEnumerable, "b", { | 245 Object.defineProperty(aMakesBEnumerable, "b", { |
| 246 value: 2, configurable:true, enumerable: false }); | 246 value: 2, configurable:true, enumerable: false }); |
| 247 assertEquals([ [ "a", 1 ], [ "b", 2 ] ], Object.entries(aMakesBEnumerable)); | 247 assertEquals([ [ "a", 1 ], [ "b", 2 ] ], Object.entries(aMakesBEnumerable)); |
| 248 } | 248 } |
| 249 TestMutateDuringEnumeration(); | 249 TestMutateDuringEnumeration(); |
| OLD | NEW |