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