OLD | NEW |
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 | 6 |
9 function toKey(x) { | 7 function toKey(x) { |
10 if (typeof x === "symbol") return x; | 8 if (typeof x === "symbol") return x; |
11 return String(x); | 9 return String(x); |
12 } | 10 } |
13 | 11 |
14 | 12 |
15 const noconf = {configurable: false}; | 13 const noconf = {configurable: false}; |
16 const noconf_nowrite = {configurable: false, writable: false}; | 14 const noconf_nowrite = {configurable: false, writable: false}; |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
204 ["ownKeys", target], log[1]); | 202 ["ownKeys", target], log[1]); |
205 assertArrayEquals( | 203 assertArrayEquals( |
206 ["getOwnPropertyDescriptor", target, toKey(0)], log[2]); | 204 ["getOwnPropertyDescriptor", target, toKey(0)], log[2]); |
207 assertArrayEquals( | 205 assertArrayEquals( |
208 ["getOwnPropertyDescriptor", target, toKey("length")], log[3]); | 206 ["getOwnPropertyDescriptor", target, toKey("length")], log[3]); |
209 assertArrayEquals( | 207 assertArrayEquals( |
210 ["getOwnPropertyDescriptor", target, toKey("wurst")], log[4]); | 208 ["getOwnPropertyDescriptor", target, toKey("wurst")], log[4]); |
211 assertArrayEquals( | 209 assertArrayEquals( |
212 ["getOwnPropertyDescriptor", target, toKey(symbol)], log[5]); | 210 ["getOwnPropertyDescriptor", target, toKey(symbol)], log[5]); |
213 })(); | 211 })(); |
OLD | NEW |