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-555.js
blob64d8596265db5ae27ab91e71b294c048f8dba2b3
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-555
6 description: >
7     ES5 Attributes - success to update [[Configurable]] attribute of
8     accessor property ([[Get]] is a Function, [[Set]] is a Function,
9     [[Enumerable]] is false, [[Configurable]] is true) to different
10     value
11 includes: [propertyHelper.js]
12 ---*/
14 var obj = {};
16 var getFunc = function() {
17   return 1001;
20 var verifySetFunc = "data";
21 var setFunc = function(value) {
22   verifySetFunc = value;
25 Object.defineProperty(obj, "prop", {
26   get: getFunc,
27   set: setFunc,
28   enumerable: false,
29   configurable: true
30 });
32 var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
33 assert.sameValue(desc1.configurable, true);
35 Object.defineProperty(obj, "prop", {
36   configurable: false
37 });
39 verifyProperty(obj, "prop", {
40   configurable: false,
41 });
43 reportCompare(0, 0);