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