blob: a1f1a7234d1c09db0ffc6fdb7b03ea1ee3a0da03 [file] [log] [blame]
<!DOCTYPE html>
<head>
<script src="../../resources/js-test.js"></script>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
</head>
<body onload="startTest()">
<input name="name1" id="input1">
<iframe id="frame1" src="resources/form-state-restore-with-frames-1.html">
</iframe>
<form id="form1" action="../../resources/back.html">
<input type="submit">
</form>
<script>
function $(id) {
return document.getElementById(id);
}
function frame$(frame, id) {
return frame.contentDocument.getElementById(id);
}
function startTest() {
if ($('input1').value == 'visited') {
shouldBeEqualToString('frame$($("frame1"), "input2").value', 'value2');
shouldBeEqualToString('frame$(frame$($("frame1"), "frame2"), "input3").value', 'value3');
finishJSTest();
} else {
setTimeout(function() {
$('input1').value = 'visited';
frame$($('frame1'), 'input2').value = 'value2';
frame$(frame$($('frame1'), 'frame2'), 'input3').value = 'value3';
$('form1').submit();
}, 0);
}
}
jsTestIsAsync = true;
</script>
</body>