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

Side by Side Diff: test/mjsunit/es8/object-values.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
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.values.length); 8 assertEquals(1, Object.values.length);
10 assertEquals(Function.prototype, Object.getPrototypeOf(Object.values)); 9 assertEquals(Function.prototype, Object.getPrototypeOf(Object.values));
11 assertEquals("values", Object.values.name); 10 assertEquals("values", Object.values.name);
12 11
13 var descriptor = Object.getOwnPropertyDescriptor(Object, "values"); 12 var descriptor = Object.getOwnPropertyDescriptor(Object, "values");
14 assertTrue(descriptor.writable); 13 assertTrue(descriptor.writable);
15 assertFalse(descriptor.enumerable); 14 assertFalse(descriptor.enumerable);
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 282
284 for (let [kind, [object, expected]] of Object.entries(element_kinds)) { 283 for (let [kind, [object, expected]] of Object.entries(element_kinds)) {
285 let result1 = Object.values(object); 284 let result1 = Object.values(object);
286 assertEquals(expected, result1, `fast Object.values() with ${kind}`); 285 assertEquals(expected, result1, `fast Object.values() with ${kind}`);
287 286
288 let proxy = new Proxy(object, {}); 287 let proxy = new Proxy(object, {});
289 let result2 = Object.values(proxy); 288 let result2 = Object.values(proxy);
290 assertEquals(result1, result2, `slow Object.values() with ${kind}`); 289 assertEquals(result1, result2, `slow Object.values() with ${kind}`);
291 } 290 }
292 })(); 291 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es8/object-get-own-property-descriptors.js ('k') | test/mjsunit/harmony/object-entries.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698