Backed out 3 changesets (bug 1892041) for causing failures on async-module-does-not...
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperties / 15.2.3.7-6-a-205.js
blob46d98ea0a075ab46aef34fb4f5115cf74ca1fb55
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.7-6-a-205
6 description: >
7     Object.defineProperties - 'O' is an Array, 'P' is an array index
8     named property, 'desc' is accessor descriptor, test updating all
9     attribute values of 'P'  (15.4.5.1 step 4.c)
10 includes: [propertyHelper.js]
11 ---*/
13 var arr = [];
15 Object.defineProperties(arr, {
16   "0": {
17     get: function() {
18       return 11;
19     },
20     set: function() {},
21     configurable: true,
22     enumerable: true
23   }
24 });
26 var setFun = function(value) {
27   arr.setVerifyHelpProp = value;
29 var getFun = function() {
30   return 14;
32 Object.defineProperties(arr, {
33   "0": {
34     get: getFun,
35     set: setFun,
36     configurable: false,
37     enumerable: false
38   }
39 });
41 verifyEqualTo(arr, "0", getFun());
43 verifyWritable(arr, "0", "setVerifyHelpProp");
45 verifyNotEnumerable(arr, "0");
47 verifyNotConfigurable(arr, "0");
49 reportCompare(0, 0);