| 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.7-6-a-231 |
| 6 |
description: > |
| 7 |
Object.defineProperties - 'O' is an Array, 'P' is an array index |
| 8 |
property, 'P' is data property and 'desc' is accessor descriptor, |
| 9 |
and the [[Configurable]] attribute value of 'P' is true, test 'P' |
| 10 |
is converted from data property to accessor property (15.4.5.1 |
| 11 |
step 4.c) |
| 12 |
includes: [propertyHelper.js] |
| 13 |
---*/ |
| 14 |
|
| 15 |
var arr = []; |
| 16 |
arr[1] = 3; // default value of attributes: writable: true, configurable: true, enumerable: true |
| 17 |
|
| 18 |
function set_fun(value) { |
| 19 |
arr.setVerifyHelpProp = value; |
| 20 |
} |
| 21 |
|
| 22 |
Object.defineProperties(arr, { |
| 23 |
"1": { |
| 24 |
set: set_fun |
| 25 |
} |
| 26 |
}); |
| 27 |
|
| 28 |
verifyWritable(arr, "1", "setVerifyHelpProp"); |
| 29 |
|
| 30 |
verifyEnumerable(arr, "1"); |
| 31 |
|
| 32 |
verifyConfigurable(arr, "1"); |