15.2.3.7-6-a-186.js (643B)
1 // Copyright (c) 2012 Ecma International. All rights reserved. 2 // This code is governed by the BSD license found in the LICENSE file. 3 4 /*--- 5 es5id: 15.2.3.7-6-a-186 6 description: > 7 Object.defineProperties - 'O' is an Array, 'P' is an array index 8 named property, 'P' is own data property (15.4.5.1 step 4.c) 9 ---*/ 10 11 var arr = []; 12 Object.defineProperty(arr, 0, { 13 value: "ownDataProperty", 14 configurable: false 15 }); 16 assert.throws(TypeError, function() { 17 Object.defineProperties(arr, { 18 "0": { 19 value: "abc", 20 configurable: true 21 } 22 }); 23 }); 24 assert.sameValue(arr[0], "ownDataProperty", 'arr[0]'); 25 26 reportCompare(0, 0);