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-82-12.js
blobba8dd041b1b8390b8eb9638acaa1c355122155eb
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-82-12
6 description: >
7     Object.defineProperty - Update [[Enumerable]] attributes of 'name'
8     property to true successfully when [[Enumerable]] attribute of
9     'name' is false and [[Configurable]] attribute of 'name' is true,
10     the 'desc' is a generic descriptor which only contains
11     [[Enumerable]] attribute as true, 'name' property is an accessor
12     property (8.12.9 step 8)
13 includes: [propertyHelper.js]
14 ---*/
17 var obj = {};
18 obj.verifySetFunction = "data";
19 var get_func = function() {
20   return obj.verifySetFunction;
22 var set_func = function(value) {
23   obj.verifySetFunction = value;
25 Object.defineProperty(obj, "foo", {
26   get: get_func,
27   set: set_func,
28   enumerable: false,
29   configurable: true
30 });
32 Object.defineProperty(obj, "foo", {
33   enumerable: true
34 });
36 verifyEqualTo(obj, "foo", get_func());
38 verifyWritable(obj, "foo", "verifySetFunction");
40 verifyEnumerable(obj, "foo");
42 verifyConfigurable(obj, "foo");
44 reportCompare(0, 0);