summaryrefslogtreecommitdiffstats
path: root/third_party/WebKit/LayoutTests/fast/forms/document-write.html
blob: e771379f63008c0b6297442c0c9162f737c19a77 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<html>
<head>
<script>
function test() {
  if (document.URL.indexOf('?') == -1) {

    if (window.testRunner) {
      testRunner.dumpAsText();
      testRunner.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.testRunner)
      testRunner.notifyDone();
  }
  
}
</script>
</head>
<body onload="test()">
<p>Test for <a href="https://bugs.webkit.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>