15.2.3.14-5-3.js (685B)
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-3 6 description: > 7 Object.keys - non-enumerable own data property of 'O' is not 8 defined in returned array 9 ---*/ 10 11 var obj = { 12 prop1: 1001, 13 prop2: 1002 14 }; 15 16 Object.defineProperty(obj, "prop3", { 17 value: 1003, 18 enumerable: true, 19 configurable: true 20 }); 21 22 Object.defineProperty(obj, "prop4", { 23 value: 1004, 24 enumerable: false, 25 configurable: true 26 }); 27 28 var arr = Object.keys(obj); 29 30 for (var p in arr) { 31 if (arr.hasOwnProperty(p)) { 32 assert.notSameValue(arr[p], "prop4", 'arr[p]'); 33 } 34 } 35 36 reportCompare(0, 0);