Debian Codegraph @

tests/auto/qml/ecmascripttests/test262/test/built-ins/Object/defineProperty/15.2.3.6-4-56.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-56
6 description: >
7 Object.defineProperty - 'name' property doesn't exist in 'O', test
8 [[Configurable]] of 'name' property is set as false if it is
9 absent in accessor descriptor 'desc' (8.12.9 step 4.b.i)
10 includes: [propertyHelper.js]
11 ---*/
12
13 var obj = {};
14 var setFunc = function(value) {
15 obj.setVerifyHelpProp = value;
16 };
17 var getFunc = function() {
18 return 10;
19 };
20
21 Object.defineProperty(obj, "property", {
22 set: setFunc,
23 get: getFunc,
24 enumerable: true
25 });
26 verifyEqualTo(obj, "property", getFunc());
27
28 verifyWritable(obj, "property", "setVerifyHelpProp");
29
30 verifyEnumerable(obj, "property");
31
32 verifyNotConfigurable(obj, "property");