4 <script src=
"../../resources/js-test.js"></script>
6 <body onload=
"runTest()">
8 <div id=
"console"></div>
10 <input id=
"emptyOnFirstVisit" />
11 <form action=
"data:text/html,<script>history.back()</script>" name
=f
>
12 <input type
="hidden" name
="hidden" value
="before" />
16 description("Bug 77391 - Hidden form elements do not save their state prior to form submission");
18 window
.jsTestIsAsync
= true;
21 var state
= document
.getElementById("emptyOnFirstVisit");
24 if (window
.testRunner
)
25 testRunner
.waitUntilDone();
26 state
.value
= "visited";
28 document
.f
.hidden
.value
= "after";
29 // Submit form in a timeout to make sure that we create a new back/forward list item.
30 setTimeout(function() {document
.f
.submit();}, 0);
33 shouldBeEqualToString("document.f.hidden.value", "after");
34 successfullyParsed
= true;