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

Side by Side Diff: test/mjsunit/es6/proxies-ownkeys.js

Issue 1815773002: Remove runtime flags for Proxy and Reflect (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased Created 4 years, 9 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
OLDNEW
1 // Copyright 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 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-proxies --harmony-reflect
6
7 var target = { 5 var target = {
8 "target_one": 1 6 "target_one": 1
9 }; 7 };
10 target.__proto__ = { 8 target.__proto__ = {
11 "target_proto_two": 2 9 "target_proto_two": 2
12 }; 10 };
13 var handler = { 11 var handler = {
14 ownKeys: function(target) { 12 ownKeys: function(target) {
15 return ["foo", "bar"]; 13 return ["foo", "bar"];
16 } 14 }
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 keys = ["nonconf", "target_one"]; 85 keys = ["nonconf", "target_one"];
88 assertEquals(keys, Reflect.ownKeys(proxy)); 86 assertEquals(keys, Reflect.ownKeys(proxy));
89 87
90 // Step 20: The trap result must not add keys to a non-extensible target. 88 // Step 20: The trap result must not add keys to a non-extensible target.
91 keys = ["nonconf", "target_one", "fantasy"]; 89 keys = ["nonconf", "target_one", "fantasy"];
92 assertThrows("Reflect.ownKeys(proxy)", TypeError); 90 assertThrows("Reflect.ownKeys(proxy)", TypeError);
93 91
94 // Check that we allow duplicated keys. 92 // Check that we allow duplicated keys.
95 keys = ['nonconf', 'target_one', 'nonconf', 'nonconf', 'target_one',] 93 keys = ['nonconf', 'target_one', 'nonconf', 'nonconf', 'target_one',]
96 assertEquals(keys, Reflect.ownKeys(proxy)); 94 assertEquals(keys, Reflect.ownKeys(proxy));
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-object-assign.js ('k') | test/mjsunit/es6/proxies-prevent-extensions.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698