<body onload="test()">
FAILURE
<script>
if (window.testRunner)
    testRunner.dumpAsText();
function test()
{
    document.write("SUCCESS (1 of 2)<script>document.open(); document.write('<br>SUCCESS (2 of 2)<br>');</scr" + "ipt>");
}
</script>
</body>
