Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / navigation / parsed-iframe-dynamic-form-back-entry.html
blob2fad5bfca630a1d9044ed2667f3b6b48bc2a2d64
1 <html>
2 <script>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
6 testRunner.dumpBackForwardList();
7 testRunner.dumpAsText();
10 function runTest()
12 var iframe = document.getElementById("testFrame");
14 var otherDocument = iframe.contentWindow.document;
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);
26 form.submit();
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>