| 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-290 |
| 6 |
description: > |
| 7 |
Object.defineProperty - 'O' is an Arguments object, 'name' is own |
| 8 |
property of 'O', and is deleted afterwards, and 'desc' is accessor |
| 9 |
descriptor, test 'name' is redefined in 'O' with all correct |
| 10 |
attribute values (10.6 [[DefineOwnProperty]] step 3) |
| 11 |
includes: [propertyHelper.js] |
| 12 |
---*/ |
| 13 |
|
| 14 |
(function() { |
| 15 |
delete arguments[0]; |
| 16 |
|
| 17 |
function getFunc() { |
| 18 |
return 10; |
| 19 |
} |
| 20 |
|
| 21 |
function setFunc(value) { |
| 22 |
this.setVerifyHelpProp = value; |
| 23 |
} |
| 24 |
Object.defineProperty(arguments, "0", { |
| 25 |
get: getFunc, |
| 26 |
set: setFunc, |
| 27 |
enumerable: true, |
| 28 |
configurable: true |
| 29 |
}); |
| 30 |
verifyEqualTo(arguments, "0", getFunc()); |
| 31 |
|
| 32 |
verifyWritable(arguments, "0", "setVerifyHelpProp"); |
| 33 |
|
| 34 |
verifyEnumerable(arguments, "0"); |
| 35 |
|
| 36 |
verifyConfigurable(arguments, "0"); |
| 37 |
}(0, 1, 2)); |