15.2.3.4-4-39.js (512B)
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.4-4-39 6 description: > 7 Object.getOwnPropertyNames - own accessor properties are pushed 8 into the returned array 9 ---*/ 10 11 var obj = {}; 12 Object.defineProperty(obj, "a", { 13 get: function() { 14 return "a"; 15 }, 16 configurable: true 17 }); 18 19 var result = Object.getOwnPropertyNames(obj); 20 21 assert.sameValue(result[0], "a", 'result[0]'); 22 23 reportCompare(0, 0);