Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-82-3.js

raw
1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 es5id: 15.2.3.6-4-82-3
6 description: >
7 Object.defineProperty - Update [[Configurable]] attribute of
8 'name' property to false successfully when [[Configurable]]
9 attribute of 'name' property is true, the 'desc' is a generic
10 descriptor which contains [[Configurable]] attribute as false,
11 'name' property is a data property (8.12.9 step 8)
12 includes: [propertyHelper.js]
13 ---*/
14
15
16 var obj = {};
17
18 Object.defineProperty(obj, "foo", {
19 value: 1001,
20 writable: true,
21 enumerable: true,
22 configurable: true
23 });
24
25 Object.defineProperty(obj, "foo", {
26 configurable: false
27 });
28
29 verifyEqualTo(obj, "foo", 1001);
30
31 verifyWritable(obj, "foo");
32
33 verifyEnumerable(obj, "foo");
34
35 verifyNotConfigurable(obj, "foo");