15.2.3.4-4-41.js (634B)
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-41 6 description: > 7 Object.getOwnPropertyNames - inherited accessor property of String 8 object 'O' is not pushed into the returned array 9 ---*/ 10 11 var str = new String("abc"); 12 13 Object.defineProperty(String.prototype, "protoProperty", { 14 get: function() { 15 return "protoString"; 16 }, 17 configurable: true 18 }); 19 20 var result = Object.getOwnPropertyNames(str); 21 22 for (var p in result) { 23 assert.notSameValue(result[p], "protoProperty", 'result[p]'); 24 } 25 26 reportCompare(0, 0);