blob: 915068a524381647c8e6742ccd6aca1f7be7cfda [file] [log] [blame]
<html>
<head>
<script>
if (window.layoutTestController) {
layoutTestController.dumpAsText();
layoutTestController.setCanOpenWindows();
layoutTestController.waitUntilDone();
}
var w;
function test()
{
w = window.open("data:text/html,HelloWorld!");
w.myProp = "1";
w.document.myProp = "2";
setTimeout(test2, 10);
}
function test2()
{
var c = document.getElementById('console');
c.innerHTML = "window retains early properties: " + ((w.myProp && w.myProp=='1') ? "PASS" : "FAIL") + "<br>";
c.innerHTML +="document does not retain early properties: " + ((w.document.myProp) ? "FAIL" : "PASS") + "<br>";
w.close();
setTimeout(doneHandler, 1);
function doneHandler() {
if (w.closed) {
if (window.layoutTestController)
layoutTestController.notifyDone();
return;
}
setTimeout(doneHandler, 1);
}
}
</script>
<body onload='test()'>
Test setting window properties right after window.open()
<div id=console>FAIL, test did not run</div>