Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperty / 15.2.3.6-4-243.js
blob08a11f87057587eb36d4139df1148d3209933b80
1 // Copyright (c) 2012 Ecma International.  All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
4 /*---
5 es5id: 15.2.3.6-4-243
6 description: >
7     Object.defineProperty - 'O' is an Array, 'name' is an array index
8     named property,  'name' is accessor property and 'desc' is data
9     descriptor, and the [[Configurable]] attribute value of 'name' is
10     true, test 'name' is converted from accessor property to data
11     property (15.4.5.1 step 4.c)
12 includes: [propertyHelper.js]
13 ---*/
16 var arrObj = [];
18 function getFunc() {
19   return 3;
21 Object.defineProperty(arrObj, "1", {
22   get: getFunc,
23   configurable: true
24 });
26 Object.defineProperty(arrObj, "1", {
27   value: 12
28 });
30 verifyEqualTo(arrObj, "1", 12);
32 verifyNotWritable(arrObj, "1");
34 verifyNotEnumerable(arrObj, "1");
36 verifyConfigurable(arrObj, "1");
38 reportCompare(0, 0);