Bug 1892041 - Part 2: Update test262. r=spidermonkey-reviewers,dminor
[gecko.git] / js / src / tests / test262 / built-ins / Object / defineProperty / 15.2.3.6-4-243-1.js
blob672f5cc677f153ccb35054df53d61e9d708f54c2
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-1
6 description: >
7     Object.defineProperty - 'O' is an Array, 'name' is an array index
8     named property,  'name' is accessor property and  assignment to
9     the accessor property, fails to convert accessor property from
10     accessor property to data property (15.4.5.1 step 4.c)
11 includes: [propertyHelper.js]
12 flags: [noStrict]
13 ---*/
16 var arrObj = [];
18 function getFunc() {
19   return 3;
21 Object.defineProperty(arrObj, "1", {
22   get: getFunc,
23   configurable: true
24 });
26 arrObj[1] = 4;
28 verifyEqualTo(arrObj, "1", getFunc());
30 verifyProperty(arrObj, "1", {
31   enumerable: false,
32   configurable: true,
33 });
35 reportCompare(0, 0);