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

Side by Side Diff: test/mjsunit/es6/proxies-prevent-extensions.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-ownkeys.js ('k') | test/mjsunit/es6/proxies-property-is-enumerable.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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 var handler = { preventExtensions() {return Symbol()} }; 76 var handler = { preventExtensions() {return Symbol()} };
79 var proxy = new Proxy(target, handler); 77 var proxy = new Proxy(target, handler);
80 78
81 // Trap returns trueish but target is extensible. 79 // Trap returns trueish but target is extensible.
82 assertThrows(() => {Reflect.preventExtensions(proxy)}, TypeError); 80 assertThrows(() => {Reflect.preventExtensions(proxy)}, TypeError);
83 81
84 // Trap returns trueish and target is not extensible. 82 // Trap returns trueish and target is not extensible.
85 Reflect.preventExtensions(target); 83 Reflect.preventExtensions(target);
86 assertTrue(Reflect.preventExtensions(proxy)); 84 assertTrue(Reflect.preventExtensions(proxy));
87 })(); 85 })();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-ownkeys.js ('k') | test/mjsunit/es6/proxies-property-is-enumerable.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698