| 1 |
// Copyright (c) 2012 Ecma International. All rights reserved. |
| 2 |
// This code is governed by the BSD license found in the LICENSE file. |
| 3 |
|
| 4 |
/*--- |
| 5 |
es5id: 15.2.3.6-4-325-1 |
| 6 |
description: > |
| 7 |
Object.defineProperty - 'O' is an Arguments object which created |
| 8 |
with function take formal parameters, 'name' is own property of |
| 9 |
[[ParameterMap]] of 'O', test 'name' is deleted if 'name' is |
| 10 |
configurable and 'desc' is accessor descriptor (10.6 |
| 11 |
[[DefineOwnProperty]] step 5.a.i) |
| 12 |
---*/ |
| 13 |
|
| 14 |
var argObj = (function(a, b, c) { |
| 15 |
return arguments; |
| 16 |
})(1, 2, 3); |
| 17 |
var accessed = false; |
| 18 |
|
| 19 |
Object.defineProperty(argObj, 0, { |
| 20 |
get: function() { |
| 21 |
accessed = true; |
| 22 |
return 12; |
| 23 |
} |
| 24 |
}); |
| 25 |
|
| 26 |
assert.sameValue(argObj[0], 12, 'argObj[0]'); |
| 27 |
assert(accessed, 'accessed !== true'); |