| 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.5-4-276 |
| 6 |
description: > |
| 7 |
Object.create - 'set' property of one property in 'Properties' is |
| 8 |
own accessor property without a get function (8.10.5 step 8.a) |
| 9 |
---*/ |
| 10 |
|
| 11 |
var descObj = {}; |
| 12 |
Object.defineProperty(descObj, "set", { |
| 13 |
set: function() {} |
| 14 |
}); |
| 15 |
|
| 16 |
var newObj = Object.create({}, { |
| 17 |
prop: descObj |
| 18 |
}); |
| 19 |
|
| 20 |
var hasProperty = newObj.hasOwnProperty("prop"); |
| 21 |
|
| 22 |
var desc = Object.getOwnPropertyDescriptor(newObj, "prop"); |
| 23 |
|
| 24 |
assert(hasProperty, 'hasProperty !== true'); |
| 25 |
assert.sameValue(typeof desc.set, "undefined", 'typeof desc.set'); |