<body onload="test()">
<p>Test for <a href="https://bugs.webkit.org/show_bug.cgi?id=14968">bug 14968</a>:
document.open() erroneously returns void instead of the new Document.</p>
<div id=result>FAILURE</div>
<script>
if (window.testRunner)
    testRunner.dumpAsText();

function test()
{
    var d = frames[0].document.open();
    d.write("<p>SUCCESS</p>");
    d.close();
    document.getElementById("result").innerHTML = d.body.innerHTML;
}
</script>
<iframe srcdoc="FAILURE"></iframe>
</body>
