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

Side by Side Diff: test/mjsunit/harmony/proxies-has.js

Issue 1505253002: [proxies] Fix HasProperty and getOwnPropertySymbols (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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 5 // Flags: --harmony-proxies
6 6
7 var target = { 7 var target = {
8 "target_one": 1 8 "target_one": 1
9 }; 9 };
10 target.__proto__ = { 10 target.__proto__ = {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 assertTrue("foo" in proxy); 42 assertTrue("foo" in proxy);
43 43
44 // Step 9b i. Trap result must confirm presence of non-configurable properties 44 // Step 9b i. Trap result must confirm presence of non-configurable properties
45 // of the target. 45 // of the target.
46 Object.defineProperty(target, "nonconf", {value: 1, configurable: false}); 46 Object.defineProperty(target, "nonconf", {value: 1, configurable: false});
47 result = false; 47 result = false;
48 assertThrows("'nonconf' in proxy", TypeError); 48 assertThrows("'nonconf' in proxy", TypeError);
49 49
50 // Step 9b iii. Trap result must confirm presence of all own properties of 50 // Step 9b iii. Trap result must confirm presence of all own properties of
51 // non-extensible targets. 51 // non-extensible targets.
52 Object.freeze(target); 52 Object.preventExtensions(target);
53 assertThrows("'nonconf' in proxy", TypeError); 53 assertThrows("'nonconf' in proxy", TypeError);
54 assertThrows("'target_one' in proxy", TypeError); 54 assertThrows("'target_one' in proxy", TypeError);
55 assertFalse("target_two" in proxy); 55 assertFalse("target_two" in proxy);
56 assertFalse("in_your_dreams" in proxy); 56 assertFalse("in_your_dreams" in proxy);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/proxies-define-property.js ('k') | test/mjsunit/harmony/proxies-ownkeys.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698