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

Side by Side Diff: test/mjsunit/es6/proxies-is-extensible.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-integrity.js ('k') | test/mjsunit/es6/proxies-json.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 () { 6 (function () {
9 // No trap. 7 // No trap.
10 8
11 var target = {}; 9 var target = {};
12 var handler = {}; 10 var handler = {};
13 var proxy = new Proxy(target, handler); 11 var proxy = new Proxy(target, handler);
14 12
15 assertTrue(Reflect.isExtensible(target)); 13 assertTrue(Reflect.isExtensible(target));
16 assertTrue(Reflect.isExtensible(proxy)); 14 assertTrue(Reflect.isExtensible(proxy));
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 var handler = { isExtensible() {return 0} }; 63 var handler = { isExtensible() {return 0} };
66 var proxy = new Proxy(target, handler); 64 var proxy = new Proxy(target, handler);
67 65
68 // Trap returns falsish but target is extensible. 66 // Trap returns falsish but target is extensible.
69 assertThrows(() => {Reflect.isExtensible(proxy)}, TypeError); 67 assertThrows(() => {Reflect.isExtensible(proxy)}, TypeError);
70 68
71 // Trap returns falsish and target is not extensible. 69 // Trap returns falsish and target is not extensible.
72 Reflect.preventExtensions(target); 70 Reflect.preventExtensions(target);
73 assertFalse(Reflect.isExtensible(proxy)); 71 assertFalse(Reflect.isExtensible(proxy));
74 })(); 72 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-integrity.js ('k') | test/mjsunit/es6/proxies-json.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698