4 if (window
.testRunner
) {
5 testRunner
.waitUntilDone();
6 testRunner
.dumpBackForwardList();
7 testRunner
.dumpAsText();
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
);
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>