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

Side by Side Diff: test/mjsunit/es6/proxies-define-property.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
6
7 // Check basic call to trap. 5 // Check basic call to trap.
8 6
9 var g_target, g_name, g_desc; 7 var g_target, g_name, g_desc;
10 var handler = { 8 var handler = {
11 defineProperty: function(target, name, desc) { 9 defineProperty: function(target, name, desc) {
12 g_target = target; 10 g_target = target;
13 g_name = name; 11 g_name = name;
14 g_desc = desc; 12 g_desc = desc;
15 return true; 13 return true;
16 } 14 }
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 // Step 16a: Trap returns true for non-compatible property descriptor. 73 // Step 16a: Trap returns true for non-compatible property descriptor.
76 Object.defineProperty(target, "foo", 74 Object.defineProperty(target, "foo",
77 {value: 1, writable: false, configurable: false}); 75 {value: 1, writable: false, configurable: false});
78 assertThrows("Object.defineProperty(proxy, 'foo', {value: 2})", TypeError); 76 assertThrows("Object.defineProperty(proxy, 'foo', {value: 2})", TypeError);
79 77
80 // Step 16b: Trap returns true for overwriting a configurable property 78 // Step 16b: Trap returns true for overwriting a configurable property
81 // with a non-configurable descriptor. 79 // with a non-configurable descriptor.
82 target.bar = "baz"; 80 target.bar = "baz";
83 assertThrows("Object.defineProperty(proxy, 'bar', {configurable: false})", 81 assertThrows("Object.defineProperty(proxy, 'bar', {configurable: false})",
84 TypeError); 82 TypeError);
OLDNEW
« no previous file with comments | « test/mjsunit/es6/proxies-cross-realm-exception.js ('k') | test/mjsunit/es6/proxies-delete-property.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698