blob: 2fad5bfca630a1d9044ed2667f3b6b48bc2a2d64 [file] [log] [blame]
<html>
<script>
if (window.testRunner) {
testRunner.waitUntilDone();
testRunner.dumpBackForwardList();
testRunner.dumpAsText();
}
function runTest()
{
var iframe = document.getElementById("testFrame");
var otherDocument = iframe.contentWindow.document;
var form = otherDocument.createElement("form");
form.setAttribute("action", "resources/notify-done.html");
form.setAttribute("name", "TestForm");
form.setAttribute("target", "testFrame");
form.setAttribute("method", "post");
var button = otherDocument.createElement("input");
button.setAttribute("type", "submit");
form.appendChild(button);
otherDocument.body.appendChild(form);
form.submit();
}
</script>
<body onload="setTimeout('runTest();', 0);">
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>
<iframe id="testFrame" name="testFrame"></iframe>
</body>
</html>