| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 (function testArrayConcatArity() { | 5 (function testArrayConcatArity() { |
| 8 "use strict"; | 6 "use strict"; |
| 9 assertEquals(1, Array.prototype.concat.length); | 7 assertEquals(1, Array.prototype.concat.length); |
| 10 })(); | 8 })(); |
| 11 | 9 |
| 12 | 10 |
| 13 (function testArrayConcatNoPrototype() { | 11 (function testArrayConcatNoPrototype() { |
| 14 "use strict"; | 12 "use strict"; |
| 15 assertEquals(void 0, Array.prototype.concat.prototype); | 13 assertEquals(void 0, Array.prototype.concat.prototype); |
| 16 })(); | 14 })(); |
| (...skipping 842 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 859 if (key === "length") return Symbol(); | 857 if (key === "length") return Symbol(); |
| 860 if (key === "2") return "baz"; | 858 if (key === "2") return "baz"; |
| 861 if (key === "3") return "bar"; | 859 if (key === "3") return "bar"; |
| 862 }; | 860 }; |
| 863 var target = []; | 861 var target = []; |
| 864 var obj = new Proxy(target, {get: getTrap, has: () => true}); | 862 var obj = new Proxy(target, {get: getTrap, has: () => true}); |
| 865 | 863 |
| 866 assertThrows(() => [].concat(obj), TypeError); | 864 assertThrows(() => [].concat(obj), TypeError); |
| 867 assertThrows(() => Array.prototype.concat.apply(obj), TypeError); | 865 assertThrows(() => Array.prototype.concat.apply(obj), TypeError); |
| 868 })(); | 866 })(); |
| OLD | NEW |