OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 // Flags: --harmony-proxies | |
6 | |
7 var handler = { | |
8 ownKeys: function(t) { return ["a", "b"]; }, | |
9 getOwnPropertyDescriptor: function(t, p) { | |
10 return {enumerable: true, configurable: true} | |
11 }, | |
12 get: function(t, p) { | |
13 return 1; | |
14 } | |
15 }; | |
16 | |
17 var proxy = new Proxy({}, handler); | |
18 | |
19 var o = {}; | |
20 | |
21 Object.assign(o, proxy); | |
22 | |
23 assertEquals({"a": 1, "b": 1}, o); | |
Toon Verwaest
2015/12/11 10:06:07
Could you add a test for string sources just to ma
Jakob Kummerow
2015/12/11 12:04:10
Done.
| |
OLD | NEW |