15.2.3.4-4-b-5.js (533B)
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-b-5 6 description: > 7 Object.getOwnPropertyNames - elements of the returned array are 8 enumerable 9 ---*/ 10 11 var propertyFound = false; 12 13 var obj = { 14 "a": "a" 15 }; 16 17 var result = Object.getOwnPropertyNames(obj); 18 19 for (var p in result) { 20 if (result[p] === "a") { 21 propertyFound = true; 22 break; 23 } 24 } 25 26 assert(propertyFound, 'Property not found'); 27 28 reportCompare(0, 0);