15.2.3.14-5-8.js (752B)
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-8 6 description: > 7 Object.keys - inherted enumerable data property that is 8 over-ridden by non-enumerable own accessor property is not defined 9 in returned array 10 ---*/ 11 12 var proto = {}; 13 Object.defineProperty(proto, "prop", { 14 value: 1003, 15 enumerable: true, 16 configurable: true 17 }); 18 var Con = function() {}; 19 Con.prototype = proto; 20 21 var obj = new Con(); 22 Object.defineProperty(obj, "prop", { 23 get: function() {}, 24 enumerable: false, 25 configurable: true 26 }); 27 28 var arr = Object.keys(obj); 29 30 for (var p in arr) { 31 assert.notSameValue(arr[p], "prop", 'arr[p]'); 32 } 33 34 reportCompare(0, 0);