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-230.js
blob61d0187d813edde5a2a1e0af5f2ec644bb0db88a
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-230
6 description: >
7     Object.defineProperty - 'O' is an Array, 'name' is an array index
8     property, the [[Get]] field of 'desc' and the [[Get]] attribute
9     value of 'name' are two objects which refer to the same object
10     (15.4.5.1 step 4.c)
11 includes: [propertyHelper.js]
12 ---*/
14 var arrObj = [];
15 arrObj.helpVerifySet = 10;
17 function getFunc() {
18   return arrObj.helpVerifySet;
21 function setFunc(value) {
22   arrObj.helpVerifySet = value;
25 Object.defineProperty(arrObj, "0", {
26   get: getFunc,
27   set: setFunc
28 });
30 Object.defineProperty(arrObj, "0", {
31   get: getFunc
32 });
33 verifyEqualTo(arrObj, "0", getFunc());
35 verifyWritable(arrObj, "0", "helpVerifySet");
37 verifyNotEnumerable(arrObj, "0");
39 verifyNotConfigurable(arrObj, "0");
41 reportCompare(0, 0);