Ben Murdoch | 097c5b2 | 2016-05-18 11:27:45 +0100 | [diff] [blame] | 1 | // Copyright 2016 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 | function f() { return arguments } |
| 6 | |
| 7 | // Reconfiguring function.name should update both the attributes and the value. |
| 8 | Object.defineProperty(f, "name", { |
| 9 | writable: true, configurable: true, value: 10}); |
| 10 | assertEquals({value: 10, writable: true, enumerable: false, configurable: true}, |
| 11 | Object.getOwnPropertyDescriptor(f, "name")); |
| 12 | |
| 13 | var args = f(); |
| 14 | |
| 15 | // Setting a value for arguments[Symbol.iterator] should not affect the |
| 16 | // attributes. |
| 17 | args[Symbol.iterator] = 10; |
| 18 | assertEquals({value: 10, writable: true, configurable: true, enumerable: false}, |
| 19 | Object.getOwnPropertyDescriptor(args, Symbol.iterator)); |