blob: b0e598d7d96ae213bb2f6ee61bf489b1891f7904 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<script>
if (window.testRunner) {
window.testRunner.dumpAsText();
window.testRunner.dumpChildFramesAsText();
window.testRunner.waitUntilDone();
}
function performTest() {
if(window.name == "submitted") {
window.name = "";
if(document.getElementById("text").value == "Correct Value")
document.getElementById("result").innerHTML = "PASS";
if (window.testRunner)
window.testRunner.notifyDone();
} else {
document.getElementById("text").value = "Old Value";
window.frames[0].location = "form-and-frame-interaction-retains-values-submit.html";
window.name="submitted";
}
}
</script>
</head>
<body onload="performTest()">
<p id="result">FAIL</p>
<p>
Test for <i><a href="https://bugs.webkit.org/show_bug.cgi?id=18401">bug 18401</a></i>
Apparent caching between form submits.
</p>
<p>
In this test the main page is loaded in a frameset, which sets the value of an input field
in a form and has an iframe, which loads a page which submits the form. The form's target
is the main page. When the form is reloaded it should not have the value that was set
before the submission.
</p>
<hr>
<form action="form-and-frame-interaction-retains-values-main.html" method="post" name="emptyForm" id="emptyForm">
<input type="text" value="Correct Value" id="text">
</form>
<iframe></iframe>
</body>
</html>
|