<html>
<script>
if (window.testRunner) {
    testRunner.waitUntilDone();
    testRunner.dumpAsText();
}

function runTest() {
    var w = window.open('window-open-then-write.html');
    w.document.write('<img src="resources/compass.jpg" onload="if (window.testRunner) setTimeout(\'testRunner.notifyDone()\', 100);">');
    w.document.close();
}
</script>
<body onload="runTest();">
<div>This tests that calling window.open() with a URL and then writing to the window using document.write still causes the WebFrame in question to have a correct WebDataSource.</div>
<div>SUCCESS! Did not assert!</div>
</body>
</html>
