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

Unified Diff: LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html

Issue 1159723003: Don't reuse HistoryItems for multiple navigations (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 5 years, 6 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/fast/history/replaceState-onbeforeunload-scroll-state-expected.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
diff --git a/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html b/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
new file mode 100644
index 0000000000000000000000000000000000000000..f77eaf6cf2fdbfafd981a9432a0885e72f615727
--- /dev/null
+++ b/LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state.html
@@ -0,0 +1,27 @@
+<body>
+<div style="height: 2000px;"></div>
+<script>
+if (window.testRunner) {
+ testRunner.dumpAsText();
+ testRunner.waitUntilDone();
+}
+
+function test() {
+ if (sessionStorage.getItem('replaceState-beforeunload') == 'true') {
+ sessionStorage.removeItem("replaceState-beforeunload");
+ document.body.appendChild(document.createTextNode(
+ "Scroll state should not be propagated between unrelated documents: " +
+ (window.scrollY == 0 ? "PASS" : "FAIL")));
+ if (window.testRunner)
+ testRunner.notifyDone();
+ } else {
+ sessionStorage.setItem('replaceState-beforeunload', 'true');
+ location = "resources/replaceState-during-beforeunload.html";
+ }
+}
+
+window.onload = function() {
+ setTimeout(test, 0);
+};
+</script>
+</body>
« no previous file with comments | « no previous file | LayoutTests/fast/history/replaceState-onbeforeunload-scroll-state-expected.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698