michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: * Contributor: michael@0: * Jeff Walden michael@0: */ michael@0: michael@0: //----------------------------------------------------------------------------- michael@0: var BUGNUMBER = 518663; michael@0: var summary = michael@0: 'Object.getOwnPropertyNames should play nicely with enumerator caching'; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: for (var p in JSON); michael@0: var names = Object.getOwnPropertyNames(JSON); michael@0: assertEq(names.length >= 2, true, michael@0: "wrong number of property names? [" + names + "]"); michael@0: assertEq(names.indexOf("parse") >= 0, true); michael@0: assertEq(names.indexOf("stringify") >= 0, true); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: reportCompare(true, true); michael@0: michael@0: print("All tests passed!");