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

Side by Side Diff: test/mjsunit/es8/object-entries.js

Issue 2464733003: Remove --harmony-* flags for new Object static methods (Closed)
Patch Set: Move tests to es8 Created 4 years, 1 month 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 | « src/flag-definitions.h ('k') | test/mjsunit/es8/object-get-own-property-descriptors.js » ('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 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
6 // Flags: --allow-natives-syntax 5 // Flags: --allow-natives-syntax
7 6
8 function TestMeta() { 7 function TestMeta() {
9 assertEquals(1, Object.entries.length); 8 assertEquals(1, Object.entries.length);
10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.entries)); 9 assertEquals(Function.prototype, Object.getPrototypeOf(Object.entries));
11 assertEquals("entries", Object.entries.name); 10 assertEquals("entries", Object.entries.name);
12 11
13 var descriptor = Object.getOwnPropertyDescriptor(Object, "entries"); 12 var descriptor = Object.getOwnPropertyDescriptor(Object, "entries");
14 assertTrue(descriptor.writable); 13 assertTrue(descriptor.writable);
15 assertFalse(descriptor.enumerable); 14 assertFalse(descriptor.enumerable);
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
306 305
307 for (let [kind, [object, expected]] of Object.entries(element_kinds)) { 306 for (let [kind, [object, expected]] of Object.entries(element_kinds)) {
308 let result1 = Object.entries(object); 307 let result1 = Object.entries(object);
309 assertEquals(expected, result1, `fast Object.entries() with ${kind}`); 308 assertEquals(expected, result1, `fast Object.entries() with ${kind}`);
310 309
311 let proxy = new Proxy(object, {}); 310 let proxy = new Proxy(object, {});
312 let result2 = Object.entries(proxy); 311 let result2 = Object.entries(proxy);
313 assertEquals(result1, result2, `slow Object.entries() with ${kind}`); 312 assertEquals(result1, result2, `slow Object.entries() with ${kind}`);
314 } 313 }
315 })(); 314 })();
OLDNEW
« no previous file with comments | « src/flag-definitions.h ('k') | test/mjsunit/es8/object-get-own-property-descriptors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698