| // Copyright (c) 2012 Ecma International. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| ES5 Attributes - Updating a named accessor property 'P' without |
| [[Set]] using simple assignment is failed, 'O' is the global |
| includes: [propertyHelper.js] |
| obj.verifySetFunc = "data"; |
| var getFunc = function () { |
| return obj.verifySetFunc; |
| Object.defineProperty(obj, "prop", { |
| assert(obj.hasOwnProperty("prop")); |
| var desc = Object.getOwnPropertyDescriptor(obj, "prop"); |
| verifyNotWritable(obj, "prop"); |
| assert.sameValue(typeof desc.set, "undefined"); |
| assert.sameValue(obj.prop, "data"); |