4 <script src=
"../../../resources/js-test.js"></script>
6 <body onload=
"runTest()">
7 <p>Test to restore form value states for a radio group.
</p>
8 <div id=
"console"></div>
10 <input id=emptyOnFirstVisit
>
12 <form action=
"data:text/html,<script>history.back()</script>" id
=form1
>
13 <input name
=user type
=radio id
=input1
>
14 <input checked name
=user type
=radio id
=input2
>
21 var parent
= document
.getElementById('parent');
22 var state
= document
.getElementById('emptyOnFirstVisit');
25 if (window
.testRunner
)
26 testRunner
.waitUntilDone();
27 state
.value
= 'visited';
29 document
.getElementById('input1').checked
= true;
30 // Submit form in a timeout to make sure that we create a new back/forward list item.
31 setTimeout(function() {document
.getElementById('form1').submit();}, 0);
34 shouldBeTrue('document.getElementById("input1").checked');
35 shouldBeFalse('document.getElementById("input2").checked');
36 if (window
.testRunner
)
37 testRunner
.notifyDone();