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