Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / WebKit / LayoutTests / http / tests / navigation / dynamic-iframe-dynamic-form-back-entry.html
blobe434a8e9681fd0b1fadb2641ff1528ac21a5831f
1 <html>
2 <script>
4 if (window.testRunner) {
5 testRunner.waitUntilDone();
6 testRunner.dumpBackForwardList();
7 testRunner.dumpAsText();
10 function runTest()
12 var iframe = document.createElement("iframe");
13 iframe.setAttribute("name", "testFrame");
14 document.body.appendChild(iframe);
16 var otherDocument = iframe.contentWindow.document;
18 var form = otherDocument.createElement("form");
19 form.setAttribute("action", "resources/notify-done.html");
20 form.setAttribute("name", "TestForm");
21 form.setAttribute("target", "testFrame");
22 form.setAttribute("method", "post");
23 var button = otherDocument.createElement("input");
24 button.setAttribute("type", "submit");
25 form.appendChild(button);
26 otherDocument.body.appendChild(form);
28 form.submit();
31 </script>
32 <body onload="setTimeout('runTest();', 0);">
33 This test sees if dynamically creating an iframe, 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>
34 </body>
35 </html>