15.2.3.14-5-12.js (703B)
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.14-5-12 6 description: > 7 Object.keys - own enumerable indexed accessor property of dense 8 array 'O' is defined in returned array 9 ---*/ 10 11 var propertyFound = false; 12 13 var obj = [2, 3, 4, 5]; 14 15 Object.defineProperty(obj, "prop", { 16 get: function() { 17 return 6; 18 }, 19 enumerable: true, 20 configurable: true 21 }); 22 23 var arr = Object.keys(obj); 24 25 for (var p in arr) { 26 if (arr.hasOwnProperty(p)) { 27 if (arr[p] === "prop") { 28 propertyFound = true; 29 break; 30 } 31 } 32 } 33 34 assert(propertyFound, 'Property not found'); 35 36 reportCompare(0, 0);