Reviewed by Brady.
authoradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2007 20:20:06 +0000 (20:20 +0000)
committeradele <adele@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 14 Aug 2007 20:20:06 +0000 (20:20 +0000)
        Test for http://bugs.webkit.org/show_bug.cgi?id=14746
        <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field

        * http/tests/navigation/resources/restore-form-state-https-1.html: Added.
        * http/tests/navigation/restore-form-state-https-expected.txt: Added.
        * http/tests/navigation/restore-form-state-https.html: Added.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@25072 268f45cc-cd09-0410-ab3c-d52691b4dbfc

LayoutTests/ChangeLog
LayoutTests/http/tests/navigation/resources/restore-form-state-https-1.html [new file with mode: 0644]
LayoutTests/http/tests/navigation/restore-form-state-https-expected.txt [new file with mode: 0644]
LayoutTests/http/tests/navigation/restore-form-state-https.html [new file with mode: 0644]

index 79ef816fb666dde611dcddddab51471c0c9b898c..f804611372d6f39d2b2c0608108f37a416edb913 100644 (file)
@@ -1,3 +1,14 @@
+2007-08-14  Adele Peterson  <adele@apple.com>
+
+        Reviewed by Brady.
+
+        Test for http://bugs.webkit.org/show_bug.cgi?id=14746
+        <rdar://problem/5401041> REGRESSION: Form state not saved for forms that submit via HTTPS even if they do not contain a password field
+
+        * http/tests/navigation/resources/restore-form-state-https-1.html: Added.
+        * http/tests/navigation/restore-form-state-https-expected.txt: Added.
+        * http/tests/navigation/restore-form-state-https.html: Added.
+
 2007-08-14  Antti Koivisto  <antti@apple.com>
 
         Reviewed by Darin.
diff --git a/LayoutTests/http/tests/navigation/resources/restore-form-state-https-1.html b/LayoutTests/http/tests/navigation/resources/restore-form-state-https-1.html
new file mode 100644 (file)
index 0000000..52b14e1
--- /dev/null
@@ -0,0 +1,35 @@
+<html>
+<script type="text/javascript" src="testcode.js"></script>
+<script>
+    // needed in case we arrive here via a client redirect
+    if (window.layoutTestController)
+        layoutTestController.notifyDone();
+</script>
+<body id="testbody" style="font-size: 32">
+This is test page that has a secure form.  It is part of a test to show that form state is restored during back/forward navigations.
+<br><br>
+<div id="console">Test Passed</div>
+<form id="testform" action="https://127.0.0.1:8443/navigation/resources/test.html" method="post">
+    <input type="submit" name="submitwithpost" value="Submit with POST"/><br>
+    <input type="submit" name="submitwithpostredirect" value="Submit with POST followed by a redirect"/><br>
+    <input type="text" name="textfield1" id="tf" value="Test Failed"/><br>
+    <input type="text" name="textfield2" value=""/><br>
+    <input type="radio" name="radiogroup1" id="radiooption1" value="male"/><br>
+    <input type="radio" name="radiogroup1" id="radiooption2" value="female"/><br>
+    <input type="checkbox" name="checkbox1"/><br>
+    <input type="checkbox" name="checkbox2"/><br>
+    <select name="selectgroup1">
+    <option value="volvo"/>Initial Value
+    <option value="saab"/>foo
+    <option value="fiat"/>Value set by User that should be Restored
+    <option value="audi"/>bar
+    </select>
+    <br>
+    <textarea name="textarea1" rows="10" cols="30" value="Initial text before user input">More initial text before user input.</textarea>
+</form>
+<script>
+    if (document.getElementById('tf').value == "Test Failed")
+        document.getElementById('console').innerHTML = "Test Failed";
+</script>
+</body>
+</html>
diff --git a/LayoutTests/http/tests/navigation/restore-form-state-https-expected.txt b/LayoutTests/http/tests/navigation/restore-form-state-https-expected.txt
new file mode 100644 (file)
index 0000000..9d5cb76
--- /dev/null
@@ -0,0 +1,19 @@
+This is test page that has a secure form. It is part of a test to show that form state is restored during back/forward navigations. 
+
+Test Passed
+
+
+
+
+
+
+
+
+
+
+============== Back Forward List ==============
+        http://127.0.0.1:8000/navigation/restore-form-state-https.html  **nav target**
+curr->  http://127.0.0.1:8000/navigation/resources/restore-form-state-https-1.html  **nav target**
+        http://127.0.0.1:8000/navigation/resources/otherpage.html  **nav target**
+===============================================
diff --git a/LayoutTests/http/tests/navigation/restore-form-state-https.html b/LayoutTests/http/tests/navigation/restore-form-state-https.html
new file mode 100644 (file)
index 0000000..3bda143
--- /dev/null
@@ -0,0 +1,8 @@
+<script type="text/javascript" src="resources/testcode.js"></script>
+<script>
+    if (window.layoutTestController)
+        layoutTestController.dumpAsText();
+    runBackTest("resources/restore-form-state-https-1.html", 1, "");
+</script>
+This page just kicks off a test, and should not appear in the expected test output.
+The files in the resources dir have comments about the tests.