2008-11-04 Anders Carlsson <andersca@apple.com>
[webkit/qt.git] / LayoutTests / security / autocomplete-cleared-on-back.html
blob0801881bc788c892d1c1129c191a307a5b09fa5e
1 <html>
2 <head>
3 <script>
5 if (window.layoutTestController) {
6 layoutTestController.dumpAsText();
7 layoutTestController.waitUntilDone();
10 function log(message)
12 var txt = document.createTextNode(message);
13 document.getElementById("logger").appendChild(txt);
14 document.getElementById("logger").appendChild(document.createElement('br'));
17 function runTest()
19 if (!sessionStorage.secondPageReached) {
20 document.getElementById("firstInput").value = "SuperSeekritValue";
21 document.getElementById("secondInput").value = "SuperSeekritValue";
22 window.location = "resources/autocomplete-cleared-on-back2.html";
23 return;
26 sessionStorage.removeItem("secondPageReached");
28 log("Input value 1 - " + document.getElementById("firstInput").value);
29 log("Input value 2 - " + document.getElementById("secondInput").value);
31 if (window.layoutTestController)
32 layoutTestController.notifyDone();
35 </script>
36 </head>
37 <body onload="runTest();">
38 This tests whether or not form input values that are designated autocomplete="off" retain their values after a navigation away from the page then returning back to it via the back button.
39 <form autocomplete="off">
40 <input type="text" id="firstInput"/>
41 </form>
42 <form>
43 <input autocomplete="off" id="secondInput"/>
44 </form>
45 <div id="logger"></div>
46 </body>
47 </html>