| // Copyright (c) 2012 Ecma International. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| ES5 Attributes - success to update [[Set]] attribute of accessor |
| property ([[Get]] is a Function, [[Set]] is a Function, |
| [[Enumerable]] is true, [[Configurable]] is true) to different |
| var getFunc = function () { |
| var verifySetFunc = "data"; |
| var setFunc = function (value) { |
| Object.defineProperty(obj, "prop", { |
| var desc1 = Object.getOwnPropertyDescriptor(obj, "prop"); |
| Object.defineProperty(obj, "prop", { |
| var desc2 = Object.getOwnPropertyDescriptor(obj, "prop"); |
| assert.sameValue(desc1.set, setFunc, 'desc1.set'); |
| assert.sameValue(typeof desc2.set, "undefined", 'typeof desc2.set'); |