michael@0: function testNewWithNonNativeProto() michael@0: { michael@0: function f() { } michael@0: var a = f.prototype = []; michael@0: for (var i = 0; i < 5; i++) michael@0: var o = new f(); michael@0: return Object.getPrototypeOf(o) === a && o.splice === Array.prototype.splice; michael@0: } michael@0: assertEq(testNewWithNonNativeProto(), true);