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

Unified Diff: LayoutTests/http/tests/navigation/location-reload-after-post.php

Issue 410223003: location.reload() after POST should re-POST (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Add comment about ClientRedirectPolicy in FrameLoader::reload() Created 6 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | LayoutTests/http/tests/navigation/location-reload-after-post-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/http/tests/navigation/location-reload-after-post.php
diff --git a/LayoutTests/http/tests/navigation/location-reload-after-post.php b/LayoutTests/http/tests/navigation/location-reload-after-post.php
new file mode 100644
index 0000000000000000000000000000000000000000..b511f2b9d8eecb7a1729ad5c4df7ca9e58fb65ab
--- /dev/null
+++ b/LayoutTests/http/tests/navigation/location-reload-after-post.php
@@ -0,0 +1,29 @@
+<body>
+<form method=post>
+<input type=submit></input>
+</form>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.dumpResourceLoadCallbacks();
+ testRunner.waitUntilDone();
+}
+
+window.onload = function() {
+ setTimeout(function() {
+ if (sessionStorage.getItem("reloadAfterPost") == null) {
+ sessionStorage.setItem("reloadAfterPost", "step1");
+ document.forms[0].submit();
+ } else if (sessionStorage.getItem("reloadAfterPost") == "step1") {
+ sessionStorage.setItem("reloadAfterPost", "step2");
+ location.reload();
+ } else {
+ sessionStorage.removeItem("reloadAfterPost");
+ if (window.testRunner)
+ testRunner.notifyDone();
+ }
+ }, 0);
+};
+
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/http/tests/navigation/location-reload-after-post-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698