| <p>This page tests which object prototype is used when calling "new" across |
| windows. If the test passes, you'll see a series of PASS messages below. |
| <iframe id="iframe" style="visibility:hidden"></iframe> |
| document.getElementById("console").appendChild(document.createTextNode(s + "\n")); |
| function shouldBe(a, aDescription, b) |
| log("PASS: " + aDescription + " should be " + b + " and is."); |
| log("FAIL: " + aDescription + " should be " + b + " but instead is " + a + "."); |
| frames[0].document.open(); |
| frames[0].document.write("<\script>function O() { }</script\>"); |
| frames[0].document.close(); |
| shouldBe(o instanceof frames[0].Object, "o instanceof frames[0].Object", true); |
| shouldBe(o.__proto__.__proto__ === frames[0].Object.prototype, "o.__proto__.__proto__ === frames[0].Object.prototype", true); |