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