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

Side by Side Diff: test/mjsunit/es6/proxies-revocable.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
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 traps = [ 6 traps = [
9 "getPrototypeOf", "setPrototypeOf", "isExtensible", "preventExtensions", 7 "getPrototypeOf", "setPrototypeOf", "isExtensible", "preventExtensions",
10 "getOwnPropertyDescriptor", "has", "get", "set", "deleteProperty", 8 "getOwnPropertyDescriptor", "has", "get", "set", "deleteProperty",
11 "defineProperty", "ownKeys", "apply", "construct" 9 "defineProperty", "ownKeys", "apply", "construct"
12 ]; 10 ];
13 11
14 var {proxy, revoke} = Proxy.revocable({}, {}); 12 var {proxy, revoke} = Proxy.revocable({}, {});
15 assertEquals(0, revoke.length); 13 assertEquals(0, revoke.length);
16 14
17 assertEquals(undefined, revoke()); 15 assertEquals(undefined, revoke());
18 for (var trap of traps) { 16 for (var trap of traps) {
19 assertThrows(() => Reflect[trap](proxy), TypeError); 17 assertThrows(() => Reflect[trap](proxy), TypeError);
20 } 18 }
21 19
22 assertEquals(undefined, revoke()); 20 assertEquals(undefined, revoke());
23 for (var trap of traps) { 21 for (var trap of traps) {
24 assertThrows(() => Reflect[trap](proxy), TypeError); 22 assertThrows(() => Reflect[trap](proxy), TypeError);
25 } 23 }
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-prototype-target-stackoverflow.js ('k') | test/mjsunit/es6/proxies-set.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698