| 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-302-1 |
| 6 |
description: > |
| 7 |
Object.defineProperty - 'O' is an Arguments object of a function |
| 8 |
that has formal parameters, 'name' is an index named property of |
| 9 |
'O' but not defined in [[ParameterMap]] of 'O', and 'desc' is |
| 10 |
accessor descriptor, test 'name' is defined in 'O' with all |
| 11 |
correct attribute values (10.6 [[DefineOwnProperty]] step 3 and |
| 12 |
step 5a) |
| 13 |
includes: [propertyHelper.js] |
| 14 |
---*/ |
| 15 |
|
| 16 |
(function(a, b, c) { |
| 17 |
delete arguments[0]; |
| 18 |
|
| 19 |
function getFunc() { |
| 20 |
return 10; |
| 21 |
} |
| 22 |
|
| 23 |
function setFunc(value) { |
| 24 |
this.setVerifyHelpProp = value; |
| 25 |
} |
| 26 |
Object.defineProperty(arguments, "0", { |
| 27 |
get: getFunc, |
| 28 |
set: setFunc, |
| 29 |
enumerable: false, |
| 30 |
configurable: false |
| 31 |
}); |
| 32 |
if (a !== 0) { |
| 33 |
$ERROR('Expected a === 0, actually ' + a); |
| 34 |
} |
| 35 |
verifyEqualTo(arguments, "0", getFunc()); |
| 36 |
|
| 37 |
verifyWritable(arguments, "0", "setVerifyHelpProp"); |
| 38 |
|
| 39 |
verifyNotEnumerable(arguments, "0"); |
| 40 |
|
| 41 |
verifyNotConfigurable(arguments, "0"); |
| 42 |
}(0, 1, 2)); |