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

Side by Side Diff: test/mjsunit/harmony/proxies-ownkeys.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
« no previous file with comments | « test/mjsunit/harmony/proxies-has.js ('k') | no next file » | 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 5 // Flags: --harmony-proxies --harmony-reflect
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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 assertThrows("Reflect.ownKeys(proxy)", TypeError); 67 assertThrows("Reflect.ownKeys(proxy)", TypeError);
68 68
69 // Step 17a: The trap result must include all non-configurable keys. 69 // Step 17a: The trap result must include all non-configurable keys.
70 Object.defineProperty(target, "nonconf", {value: 1, configurable: false}); 70 Object.defineProperty(target, "nonconf", {value: 1, configurable: false});
71 keys = ["foo"]; 71 keys = ["foo"];
72 assertThrows("Reflect.ownKeys(proxy)", TypeError); 72 assertThrows("Reflect.ownKeys(proxy)", TypeError);
73 keys = ["nonconf"]; 73 keys = ["nonconf"];
74 assertEquals(keys, Reflect.ownKeys(proxy)); 74 assertEquals(keys, Reflect.ownKeys(proxy));
75 75
76 // Step 19a: The trap result must all keys of a non-extensible target. 76 // Step 19a: The trap result must all keys of a non-extensible target.
77 Object.freeze(target); 77 Object.preventExtensions(target);
78 assertThrows("Reflect.ownKeys(proxy)", TypeError); 78 assertThrows("Reflect.ownKeys(proxy)", TypeError);
79 keys = ["nonconf", "target_one"]; 79 keys = ["nonconf", "target_one"];
80 assertEquals(keys, Reflect.ownKeys(proxy)); 80 assertEquals(keys, Reflect.ownKeys(proxy));
81 81
82 // Step 20: The trap result must not add keys to a non-extensible target. 82 // Step 20: The trap result must not add keys to a non-extensible target.
83 keys = ["nonconf", "target_one", "fantasy"]; 83 keys = ["nonconf", "target_one", "fantasy"];
84 assertThrows("Reflect.ownKeys(proxy)", TypeError); 84 assertThrows("Reflect.ownKeys(proxy)", TypeError);
OLDNEW
« no previous file with comments | « test/mjsunit/harmony/proxies-has.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698