Index: LayoutTests/http/tests/navigation/same-document-scroll-position-restore-pushstate.html |
diff --git a/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-pushstate.html b/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-pushstate.html |
new file mode 100644 |
index 0000000000000000000000000000000000000000..21d5387eb79e32f07af3504d31c527ed9abab7bc |
--- /dev/null |
+++ b/LayoutTests/http/tests/navigation/same-document-scroll-position-restore-pushstate.html |
@@ -0,0 +1,25 @@ |
+<!DOCTYPE html> |
+<body> |
+<script src="/js-test-resources/js-test.js"></script> |
+<div style="height: 1100px">scroll down...</div> |
+<div id="log"></div> |
+<script> |
+if (window.testRunner) { |
+ testRunner.dumpAsText(); |
+ testRunner.waitUntilDone(); |
+} |
+ |
+window.onload = function() { |
+ window.scrollBy(0, 1000); |
+ history.pushState({}, '', ''); |
+ history.pushState({}, '', ''); |
+ scrollOffsetY = window.scrollY; |
+ history.back(); |
+ setTimeout(function() { |
+ shouldBeTrue('window.scrollY == scrollOffsetY'); |
+ if (window.testRunner) |
+ testRunner.notifyDone(); |
+ }, 0); |
+}; |
+</script> |
+</body> |