Chromium Code Reviews| Index: test/mjsunit/harmony/proxies-object-assign.js |
| diff --git a/test/mjsunit/harmony/proxies-object-assign.js b/test/mjsunit/harmony/proxies-object-assign.js |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..f745b205a8b086de1aa52f3a044b83d32c37e20c |
| --- /dev/null |
| +++ b/test/mjsunit/harmony/proxies-object-assign.js |
| @@ -0,0 +1,23 @@ |
| +// Copyright 2015 the V8 project authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +// Flags: --harmony-proxies |
| + |
| +var handler = { |
| + ownKeys: function(t) { return ["a", "b"]; }, |
| + getOwnPropertyDescriptor: function(t, p) { |
| + return {enumerable: true, configurable: true} |
| + }, |
| + get: function(t, p) { |
| + return 1; |
| + } |
| +}; |
| + |
| +var proxy = new Proxy({}, handler); |
| + |
| +var o = {}; |
| + |
| +Object.assign(o, proxy); |
| + |
| +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.
|