Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-354-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-354-3
6 description: >
7 Object.defineProperty will update [[Value]] attribute successfully
8 when [[Configurable]] attribute is true and [[Writable]] attribute
9 is false, 'O' is an Arguments object (8.12.9 - step Note)
10 includes: [propertyHelper.js]
11 ---*/
12
13
14 var obj = (function() {
15 return arguments;
16 }());
17
18 Object.defineProperty(obj, "property", {
19 value: 1001,
20 writable: false,
21 configurable: true
22 });
23
24 Object.defineProperty(obj, "property", {
25 value: 1002
26 });
27
28 verifyEqualTo(obj, "property", 1002);
29
30 verifyNotWritable(obj, "property");
31
32 verifyNotEnumerable(obj, "property");
33
34 verifyConfigurable(obj, "property");