| 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-36 |
| 6 |
description: > |
| 7 |
Object.defineProperty - 'O' is a Boolean object that uses Object's |
| 8 |
[[GetOwnProperty]] method to access the 'name' property (8.12.9 |
| 9 |
step 1) |
| 10 |
---*/ |
| 11 |
|
| 12 |
var obj = new Boolean(true); |
| 13 |
|
| 14 |
Object.defineProperty(obj, "foo", { |
| 15 |
value: 12, |
| 16 |
configurable: false |
| 17 |
}); |
| 18 |
assert.throws(TypeError, function() { |
| 19 |
Object.defineProperty(obj, "foo", { |
| 20 |
value: 11, |
| 21 |
configurable: true |
| 22 |
}); |
| 23 |
}); |
| 24 |
assert.sameValue(obj.foo, 12, 'obj.foo'); |