<html>
<head>
<title>document.open</title>
</head>
<body onLoad="mainFunc();">
<script>
function mainFunc() {
if (window.testRunner)
testRunner.dumpAsText();
document.open();
document.write("will not be visible<br>");
document.close();
for (i = 0; i < 5; i++) {
document.open();
document.write("There should be only one line of text here. <a href=\'https://bugs.webkit.org/show_bug.cgi?id=4395\'>Bug 4395</a><br>");
}
}
</script>
</body>
</html>