chromium/third_party/blink/web_tests/http/tests/navigation/parsed-iframe-dynamic-form-back-entry.html

<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>