1 <body onload=
"handleLoad()">
2 <form action=
"state-restore-broken-state-2.html" name=f
>
3 <input name=
"name1" value=
"unmodified">
7 function handleLoad() {
8 if (!parent
.hasReloaded
) {
9 parent
.hasReloaded
= true;
10 document
.f
.name1
.value
= 'modified';
11 setTimeout("location.reload();", 0);
13 window
.onunload = function() {
14 var stateArray
= internals
.formControlStateOfHistoryItem();
15 // Omit the signature string because it is volatile.
16 console
.log('Generated state: [' + stateArray
.slice(1) + ']');
19 } else if (!parent
.isGoingBack
) {
20 var stateArray
= internals
.formControlStateOfHistoryItem();
22 setTimeout(function() {
23 window
.location
.href
= 'go-back.html';
26 window
.onunload = function() {
27 stateArray
.push('***broken***');
28 internals
.setFormControlStateOfHistoryItem(stateArray
);
29 parent
.didLoadAnotherDocument();
32 parent
.didSecondLoad();