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