1 <p>This page tests which object prototype is used when calling
"new" across
2 windows. If the test passes, you'll see a series of PASS messages below.
5 <pre id=
"console"></pre>
7 <iframe id=
"iframe" style=
"visibility:hidden"></iframe>
12 document
.getElementById("console").appendChild(document
.createTextNode(s
+ "\n"));
15 function shouldBe(a
, aDescription
, b
)
18 log("PASS: " + aDescription
+ " should be " + b
+ " and is.");
20 log("FAIL: " + aDescription
+ " should be " + b
+ " but instead is " + a
+ ".");
23 if (window
.testRunner
)
24 testRunner
.dumpAsText();
26 frames
[0].document
.open();
27 frames
[0].document
.write("<\script>function O() { }</script\>");
28 frames
[0].document
.close();
30 var o
= new frames
[0].O
;
31 shouldBe(o
instanceof frames
[0].Object
, "o instanceof frames[0].Object", true);
32 shouldBe(o
.__proto__
.__proto__
=== frames
[0].Object
.prototype, "o.__proto__.__proto__ === frames[0].Object.prototype", true);