| // Copyright (c) 2012 Ecma International. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| Object.defineProperty - 'set' property in 'Attributes' is own |
| accessor property that overrides an inherited accessor property |
| Object.defineProperty(proto, "set", { |
| return function (value) { |
| var ConstructFun = function () { }; |
| ConstructFun.prototype = proto; |
| var child = new ConstructFun(); |
| Object.defineProperty(child, "set", { |
| return function (value) { |
| Object.defineProperty(obj, "property", child); |
| obj.property = "ownAccessorProperty"; |
| assert(obj.hasOwnProperty("property"), 'obj.hasOwnProperty("property") !== true'); |
| assert.sameValue(data1, "data", 'data1'); |
| assert.sameValue(data2, "ownAccessorProperty", 'data2'); |