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-82-1.js
blobc5dfda4bc989adb98d9df25c280370e9fec9874e
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-1
6 description: >
7     Object.defineProperty - Update [[Enumerable]] attribute of 'name'
8     property to false successfully when [[Enumerable]] and
9     [[Configurable]] attributes of 'name' property are true,  the
10     'desc' is a generic descriptor which only contains [[Enumerable]]
11     attribute as false, 'name' property is a data property (8.12.9
12     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 });
30 verifyProperty(obj, "foo", {
31   value: 1001,
32   writable: true,
33   enumerable: false,
34   configurable: true,
35 });
37 reportCompare(0, 0);