Reviewed by Maciej and Darin.
[WebKit-https.git] / LayoutTests / fast / forms / document-write.html
1 <html>
2 <head>
3 <script>
4 function test() {
5   if (document.URL.indexOf('?') == -1) {
6
7     if (window.layoutTestController) {
8       layoutTestController.dumpAsText();
9       layoutTestController.waitUntilDone();
10     }
11     
12     document.write("<html><body>" +
13     "<form name='f' action='?' method='post'>" +
14     "<input type=submit></form><scri" +
15     "pt>document.f.submit();</scri" +
16     "pt></body></html>");
17   } else {
18     document.getElementById("result").innerHTML="SUCCESS";
19     if (window.layoutTestController)
20       layoutTestController.notifyDone();
21   }
22   
23 }
24 </script>
25 </head>
26 <body onload="test()">
27 <p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=4372">bug 4372</a>:
28 JavaScript document.write page form does not submit in Safari if document.close is not called.</p>
29 <p id=result>FAILURE</p>
30 </body>
31 </html>