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-540-8
7 Object.defineProperty fails to update [[Get]] and [[Set]]
8 attributes of an indexed accessor property 'P' whose
9 [[Configurable]] attribute is false, 'O' is an Arguments object
11 includes: [propertyHelper.js]
14 var obj = (function() {
18 obj.verifySetFunction = "data";
19 var getFunc = function() {
20 return obj.verifySetFunction;
22 var setFunc = function(value) {
23 obj.verifySetFunction = value;
25 Object.defineProperty(obj, "0", {
33 Object.defineProperty(obj, "0", {
39 result = e instanceof TypeError;
40 verifyEqualTo(obj, "0", getFunc());
42 verifyWritable(obj, "0", "verifySetFunction");
44 verifyNotEnumerable(obj, "0");
46 verifyNotConfigurable(obj, "0");
50 Object.defineProperty(obj, "0", {
51 set: function(value) {
52 obj.verifySetFunction1 = value;
57 throw new Test262Error('Expected result to be true, actually ' + result);
60 verifyEqualTo(obj, "0", getFunc());
62 verifyWritable(obj, "0", "verifySetFunction");
64 verifyNotEnumerable(obj, "0");
66 verifyNotConfigurable(obj, "0");
68 if (!(e instanceof TypeError)) {
69 throw new Test262Error("Expected TypeError, got " + e);