1 // Copyright (c) 2012 Ecma International. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
5 es5id: 15.2.3.6-4-547-2
7 ES5 Attributes - Updating a named accessor property 'P' whose
8 [[Configurable]] attribute is false to a data property does not
9 succeed, 'A' is an Arguments object (8.12.9 step 9.a)
10 includes: [propertyHelper.js]
13 var obj = (function() {
17 obj.verifySetFunc = "data";
18 var getFunc = function() {
19 return obj.verifySetFunc;
22 var setFunc = function(value) {
23 obj.verifySetFunc = value;
26 Object.defineProperty(obj, "prop", {
32 var desc1 = Object.getOwnPropertyDescriptor(obj, "prop");
35 Object.defineProperty(obj, "prop", {
39 throw new Test262Error("Expected an exception.");
41 var desc2 = Object.getOwnPropertyDescriptor(obj, "prop");
43 if (!desc1.hasOwnProperty("get")) {
44 throw new Test262Error('Expected desc1.hasOwnProperty("get") to be true, actually ' + desc1.hasOwnProperty("get"));
47 if (desc2.hasOwnProperty("value")) {
48 throw new Test262Error('Expected !desc2.hasOwnProperty("value") to be true, actually ' + !desc2.hasOwnProperty("value"));
52 verifyEqualTo(obj, "prop", getFunc());
54 verifyWritable(obj, "prop", "verifySetFunc");
56 verifyEnumerable(obj, "prop");
58 verifyNotConfigurable(obj, "prop");
61 if (!(e instanceof TypeError)) {
62 throw new Test262Error("Expected TypeError, got " + e);