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

Side by Side Diff: test/mjsunit/es6/proxies-object-assign.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-keys.js ('k') | test/mjsunit/es6/proxies-ownkeys.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 handler = { 5 var handler = {
8 ownKeys: function(t) { return ["a", "b"]; }, 6 ownKeys: function(t) { return ["a", "b"]; },
9 getOwnPropertyDescriptor: function(t, p) { 7 getOwnPropertyDescriptor: function(t, p) {
10 return {enumerable: true, configurable: true} 8 return {enumerable: true, configurable: true}
11 }, 9 },
12 get: function(t, p) { 10 get: function(t, p) {
13 return 1; 11 return 1;
14 } 12 }
15 }; 13 };
16 14
17 var proxy = new Proxy({}, handler); 15 var proxy = new Proxy({}, handler);
18 16
19 var o = {}; 17 var o = {};
20 18
21 Object.assign(o, proxy); 19 Object.assign(o, proxy);
22 20
23 assertEquals({"a": 1, "b": 1}, o); 21 assertEquals({"a": 1, "b": 1}, o);
24 22
25 (function TestStringSources() { 23 (function TestStringSources() {
26 var source = "abc"; 24 var source = "abc";
27 var target = {}; 25 var target = {};
28 Object.assign(target, source); 26 Object.assign(target, source);
29 assertEquals({0: "a", 1: "b", 2: "c"}, target); 27 assertEquals({0: "a", 1: "b", 2: "c"}, target);
30 })(); 28 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-keys.js ('k') | test/mjsunit/es6/proxies-ownkeys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698