Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Side by Side Diff: LayoutTests/http/tests/history/back-to-post.html

Issue 22982011: Reland "Fix form resubmissions happening silently." (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/history/back-to-post.php » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 <html>
2 <body>
3 <p>Test for <a href="rdar://problem/6791439">rdar://problem/6791439</a>
4 Getting an error page instead of login page navigating back in gmail.</p>
5 <div id="result">FAIL: Script did not run</div>
6
7 <form action="back-to-post.html" method="post">
8 <input name="a" value="b">
9 <input id="mysubmit" type="submit" name="Submit" value="Submit">
10 </form>
11 <script>
12
13 function submitForm()
14 {
15 // Submit form in a timeout to make sure that we create a new back/forward l ist item.
16 setTimeout(function() {document.forms[0].submit()}, 0);
17 }
18
19 if (window.testRunner) {
20 testRunner.dumpAsText();
21 testRunner.waitUntilDone();
22 testRunner.setCustomPolicyDelegate(true, true);
23 }
24
25 var step = localStorage.getItem("back-to-post");
26 if (step == null) {
27 localStorage.setItem("back-to-post", "1");
28 submitForm();
29 } else if (step == "1") {
30 localStorage.setItem("back-to-post", "2");
31 submitForm();
32 } else if (step == "2") {
33 // Test that going back to form submission result works.
34 localStorage.setItem("back-to-post", "3");
35 history.back();
36 } else if (step == "3") {
37 localStorage.removeItem("back-to-post");
38 document.getElementById("result").innerHTML = 'PASS';
39 if (window.testRunner)
40 testRunner.notifyDone();
41 }
42 </script>
43 </body>
44 </html>
OLDNEW
« no previous file with comments | « LayoutTests/TestExpectations ('k') | LayoutTests/http/tests/history/back-to-post.php » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698