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-5.js
blobd0dae554c5d0ae93f59dc827df783666efce142b
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-5
6 description: >
7     Object.defineProperty - Update [[Enumerable]] and [[Configurable]]
8     attributes of 'name' property to false successfully when
9     [[Enumerable]] and [[Configurable]] attributes of 'name' property
10     are true, the 'desc' is a generic descriptor which contains
11     [[Enumerable]] and [[Configurable]] attributes as false, 'name'
12     property is a data property (8.12.9 step 8)
13 includes: [propertyHelper.js]
14 ---*/
17 var obj = {};
19 Object.defineProperty(obj, "foo", {
20   value: 1001,
21   writable: true,
22   enumerable: true,
23   configurable: true
24 });
26 Object.defineProperty(obj, "foo", {
27   enumerable: false,
28   configurable: false
29 });
31 verifyEqualTo(obj, "foo", 1001);
33 verifyWritable(obj, "foo");
35 verifyNotEnumerable(obj, "foo");
37 verifyNotConfigurable(obj, "foo");
39 reportCompare(0, 0);