Reviewed by Maciej and Darin.

        http://bugzilla.opendarwin.org/show_bug.cgi?id=4372
        JavaScript document.write page form does not submit in Safari

        Test: fast/forms/document-write.html

        * page/Frame.cpp:
        (WebCore::Frame::submitForm): Don't check for parsing().



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@16694 268f45cc-cd09-0410-ab3c-d52691b4dbfc
diff --git a/LayoutTests/fast/forms/document-write-expected.txt b/LayoutTests/fast/forms/document-write-expected.txt
new file mode 100644
index 0000000..f35a800
--- /dev/null
+++ b/LayoutTests/fast/forms/document-write-expected.txt
@@ -0,0 +1,5 @@
+Test for bug 4372: JavaScript document.write page form does not submit in Safari if document.close is not called.
+
+SUCCESS
+
+
diff --git a/LayoutTests/fast/forms/document-write.html b/LayoutTests/fast/forms/document-write.html
new file mode 100644
index 0000000..235467e
--- /dev/null
+++ b/LayoutTests/fast/forms/document-write.html
@@ -0,0 +1,31 @@
+<html>
+<head>
+<script>
+function test() {
+  if (document.URL.indexOf('?') == -1) {
+
+    if (window.layoutTestController) {
+      layoutTestController.dumpAsText();
+      layoutTestController.waitUntilDone();
+    }
+    
+    document.write("<html><body>" +
+    "<form name='f' action='?' method='post'>" +
+    "<input type=submit></form><scri" +
+    "pt>document.f.submit();</scri" +
+    "pt></body></html>");
+  } else {
+    document.getElementById("result").innerHTML="SUCCESS";
+    if (window.layoutTestController)
+      layoutTestController.notifyDone();
+  }
+  
+}
+</script>
+</head>
+<body onload="test()">
+<p>Test for <a href="http://bugzilla.opendarwin.org/show_bug.cgi?id=4372">bug 4372</a>:
+JavaScript document.write page form does not submit in Safari if document.close is not called.</p>
+<p id=result>FAILURE</p>
+</body>
+</html>