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

Side by Side Diff: test/mjsunit/es6/proxies-set.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-revocable.js ('k') | test/mjsunit/es6/proxies-set-prototype-of.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 --harmony-reflect
6
7 5
8 function sloppyDefaultSet(o, p, v) { return o[p] = v } 6 function sloppyDefaultSet(o, p, v) { return o[p] = v }
9 function sloppyReflectSet(o, p, v) { return Reflect.set(o, p, v) } 7 function sloppyReflectSet(o, p, v) { return Reflect.set(o, p, v) }
10 function strictDefaultSet(o, p, v) { "use strict"; return o[p] = v } 8 function strictDefaultSet(o, p, v) { "use strict"; return o[p] = v }
11 function strictReflectSet(o, p, v) { "use strict"; return Reflect.set(o, p, v) } 9 function strictReflectSet(o, p, v) { "use strict"; return Reflect.set(o, p, v) }
12 10
13 sloppyDefaultSet.shouldThrow = false; 11 sloppyDefaultSet.shouldThrow = false;
14 sloppyReflectSet.shouldThrow = false; 12 sloppyReflectSet.shouldThrow = false;
15 strictDefaultSet.shouldThrow = true; 13 strictDefaultSet.shouldThrow = true;
16 strictReflectSet.shouldThrow = false; 14 strictReflectSet.shouldThrow = false;
(...skipping 286 matching lines...) Expand 10 before | Expand all | Expand 10 after
303 for (var receiver of [null, undefined, 1]) { 301 for (var receiver of [null, undefined, 1]) {
304 Reflect.set(object, p, 42, receiver); 302 Reflect.set(object, p, 42, receiver);
305 assertEquals(1, observations.length); 303 assertEquals(1, observations.length);
306 assertArrayEquals([target, toKey(p), 42, receiver], observations[0]); 304 assertArrayEquals([target, toKey(p), 42, receiver], observations[0]);
307 assertSame(target, observations[0][0]); 305 assertSame(target, observations[0][0]);
308 assertSame(receiver, observations[0][3]); 306 assertSame(receiver, observations[0][3]);
309 observations = []; 307 observations = [];
310 } 308 }
311 } 309 }
312 })(); 310 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-revocable.js ('k') | test/mjsunit/es6/proxies-set-prototype-of.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698