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

Side by Side Diff: test/mjsunit/es6/proxies-keys.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
« no previous file with comments | « test/mjsunit/es6/proxies-json.js ('k') | test/mjsunit/es6/proxies-object-assign.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 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
6
7 var target = { 5 var target = {
8 target: 1 6 target: 1
9 }; 7 };
10 target.__proto__ = { 8 target.__proto__ = {
11 target_proto: 2 9 target_proto: 2
12 }; 10 };
13 11
14 var handler = { 12 var handler = {
15 ownKeys: function(target) { 13 ownKeys: function(target) {
16 return ["foo", "bar", Symbol("baz"), "non-enum", "not-found"]; 14 return ["foo", "bar", Symbol("baz"), "non-enum", "not-found"];
(...skipping 15 matching lines...) Expand all
32 assertEquals([], Object.keys(proxy)); 30 assertEquals([], Object.keys(proxy));
33 31
34 // Throwing shouldn't crash. 32 // Throwing shouldn't crash.
35 handler.getOwnPropertyDescriptor = function() { throw new Number(1); }; 33 handler.getOwnPropertyDescriptor = function() { throw new Number(1); };
36 assertThrows("Object.keys(proxy)", Number); 34 assertThrows("Object.keys(proxy)", Number);
37 35
38 // Fall through to target if there is no trap. 36 // Fall through to target if there is no trap.
39 handler.ownKeys = undefined; 37 handler.ownKeys = undefined;
40 assertEquals(["target"], Object.keys(proxy)); 38 assertEquals(["target"], Object.keys(proxy));
41 assertEquals(["target"], Object.keys(target)); 39 assertEquals(["target"], Object.keys(target));
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-json.js ('k') | test/mjsunit/es6/proxies-object-assign.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698