michael@0: /* michael@0: * Any copyright is dedicated to the Public Domain. michael@0: * http://creativecommons.org/licenses/publicdomain/ michael@0: */ michael@0: michael@0: var gTestfile = 'array-inherited-__proto__.js'; michael@0: var BUGNUMBER = 769041; michael@0: var summary = michael@0: "The [[Prototype]] of an object whose prototype chain contains an array " + michael@0: "isn't that array's [[Prototype]]"; michael@0: michael@0: print(BUGNUMBER + ": " + summary); michael@0: michael@0: /************** michael@0: * BEGIN TEST * michael@0: **************/ michael@0: michael@0: var arr = []; michael@0: assertEq(Array.isArray(arr), true); michael@0: var objWithArrPrototype = Object.create(arr); michael@0: assertEq(!Array.isArray(objWithArrPrototype), true); michael@0: assertEq(objWithArrPrototype.__proto__, arr); michael@0: var objWithArrGrandPrototype = Object.create(objWithArrPrototype); michael@0: assertEq(!Array.isArray(objWithArrGrandPrototype), true); michael@0: assertEq(objWithArrGrandPrototype.__proto__, objWithArrPrototype); michael@0: michael@0: /******************************************************************************/ michael@0: michael@0: if (typeof reportCompare === "function") michael@0: reportCompare(true, true); michael@0: michael@0: print("Tests complete");