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

Unified Diff: LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html

Issue 1239463005: Replace history.options with history.scrollRestoration attribute (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Move setScrollRestorationType to History Created 5 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
Index: LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html
diff --git a/LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html b/LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html
index 14c1555f7290f69a4bacde72aa2ea94ac073b71b..82405880c172ad01937d93992ebcda963ba7016d 100644
--- a/LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html
+++ b/LayoutTests/fast/loader/scroll-position-restoration-for-history-api.html
@@ -35,8 +35,6 @@ function handleNavigation() {
for (var key in tests) {
var test = tests[key];
var args = [{key: key}, '', key];
- if ('options' in test)
- args.push(test.options);
if (test.type == 'push') {
history.pushState.apply(history, args);
@@ -45,6 +43,9 @@ function handleNavigation() {
history.replaceState.apply(history, args);
}
+ if ('options' in test)
+ history.scrollRestoration = test.options.scrollRestoration;
+
window.scrollBy(50, 100);
}

Powered by Google App Engine
This is Rietveld 408576698