Use testRunner instead of layoutTestController in tests still found to be using layou...
[WebKit-https.git] / LayoutTests / http / tests / navigation / parsed-iframe-dynamic-form-back-entry.html
1 <html>
2 <script>
3
4 if (window.testRunner) {
5     testRunner.waitUntilDone();
6     testRunner.dumpBackForwardList();
7     testRunner.dumpAsText();
8 }
9
10 function runTest()
11 {
12     var iframe = document.getElementById("testFrame");
13
14     var otherDocument = iframe.contentWindow.document;
15
16     var form = otherDocument.createElement("form");
17     form.setAttribute("action", "resources/notify-done.html");
18     form.setAttribute("name", "TestForm");
19     form.setAttribute("target", "testFrame");
20     form.setAttribute("method", "post");
21     var button = otherDocument.createElement("input");
22     button.setAttribute("type", "submit");
23     form.appendChild(button);
24     otherDocument.body.appendChild(form);
25
26     form.submit();
27 }
28
29 </script>
30 <body onload="setTimeout('runTest();', 0);">
31 This test sees if starting with an empty iframe in the markup, dynamically adding form elements to it, and dynamically submitting the form result in an extra back/forward entry.  It is important that these steps run after the initial load is complete, hence the setTimeout() for running the test.<br>
32 <iframe id="testFrame" name="testFrame"></iframe>
33 </body>
34 </html>