| 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.7-6-a-31 |
| 6 |
description: > |
| 7 |
Object.defineProperties - 'desc' is data descriptor, test setting |
| 8 |
all attribute values of 'P' (8.12.9 step 4.a.i) |
| 9 |
includes: [propertyHelper.js] |
| 10 |
---*/ |
| 11 |
|
| 12 |
var obj = {}; |
| 13 |
|
| 14 |
Object.defineProperties(obj, { |
| 15 |
prop: { |
| 16 |
value: 1002, |
| 17 |
writable: false, |
| 18 |
enumerable: false, |
| 19 |
configurable: false |
| 20 |
} |
| 21 |
}); |
| 22 |
verifyEqualTo(obj, "prop", 1002); |
| 23 |
|
| 24 |
verifyNotWritable(obj, "prop"); |
| 25 |
|
| 26 |
verifyNotEnumerable(obj, "prop"); |
| 27 |
|
| 28 |
verifyNotConfigurable(obj, "prop"); |