OLD | NEW |
1 <?php | 1 <?php |
2 if($_SERVER['REQUEST_METHOD'] == "POST") { | 2 if($_SERVER['REQUEST_METHOD'] == "POST") { |
3 header("Location: post-redirect-get-reload.php", true, 303); | 3 header("Location: post-redirect-get-reload.php", true, 303); |
4 exit; | 4 exit; |
5 } | 5 } |
6 ?> | 6 ?> |
7 <body> | 7 <body> |
8 1. Submit a form<br> | 8 1. Submit a form<br> |
9 1a. The form redirects to a get.<br> | 9 1a. The form redirects to a get.<br> |
10 2. Reload<br><br> | 10 2. Reload<br><br> |
11 The reload should not trigger a form resubmission warning. | 11 The reload should not trigger a form resubmission warning. |
12 | 12 |
13 <form name="form" action="post-redirect-get-reload.php" method="post"><input typ
e="submit"></input></form> | 13 <form name="form" action="post-redirect-get-reload.php" method="post"><input typ
e="submit"></input></form> |
14 <script> | 14 <script> |
15 | 15 |
16 if (window.testRunner) { | 16 if (window.testRunner) { |
17 testRunner.dumpAsText(); | 17 testRunner.dumpAsText(); |
18 testRunner.waitUntilDone(); | 18 testRunner.waitUntilDone(); |
19 | 19 |
20 if (window.sessionStorage["prgl-state"] == null) { | 20 if (window.sessionStorage["prgl-state"] == null) { |
21 window.sessionStorage["prgl-state"] = 'submitted'; | 21 window.sessionStorage["prgl-state"] = 'submitted'; |
22 document.form.submit(); | 22 document.form.submit(); |
23 } else { | 23 } else { |
24 window.sessionStorage.clear(); | 24 window.sessionStorage.clear(); |
25 testRunner.waitForPolicyDelegate(); | 25 testRunner.waitForPolicyDelegate(); |
26 window.internals.forceReload(false); | 26 window.internals.forceReload(false); |
27 } | 27 } |
28 } | 28 } |
29 </script> | 29 </script> |
OLD | NEW |