| 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-38 |
| 6 |
description: > |
| 7 |
Object.defineProperty - 'O' is the Math object that uses Object's |
| 8 |
[[GetOwnProperty]] method to access the 'name' property (8.12.9 |
| 9 |
step 1) |
| 10 |
includes: [propertyHelper.js] |
| 11 |
---*/ |
| 12 |
|
| 13 |
try { |
| 14 |
Object.defineProperty(Math, "foo", { |
| 15 |
value: 12, |
| 16 |
configurable: true |
| 17 |
}); |
| 18 |
|
| 19 |
verifyEqualTo(Math, "foo", 12); |
| 20 |
|
| 21 |
verifyNotWritable(Math, "foo"); |
| 22 |
|
| 23 |
verifyNotEnumerable(Math, "foo"); |
| 24 |
|
| 25 |
verifyConfigurable(Math, "foo"); |
| 26 |
} finally { |
| 27 |
delete Math.foo; |
| 28 |
} |