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

Unified Diff: third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)
Patch Set: fix test Created 3 years, 10 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: third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
diff --git a/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp b/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
index 064bb9143791c82fd447a1d0d796a7242ed8b0de..42646c35ea5254141164d130cec39732262f6e34 100644
--- a/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
@@ -58,6 +58,7 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithScale) {
loader.documentLoader()->initialScrollState().wasScrolledByUser = false;
loader.currentItem()->setPageScaleFactor(2);
loader.currentItem()->setScrollOffset(ScrollOffset(0, 200));
+ loader.currentItem()->setDidSaveScrollOrScaleState(true);
majidvp 2017/02/15 17:37:32 I don't think this is needed!
// Flip back the wasScrolledByUser flag which was set to true by
// setPageScaleFactor because otherwise
@@ -88,6 +89,7 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithoutScale) {
loader.documentLoader()->initialScrollState().wasScrolledByUser = false;
loader.currentItem()->setPageScaleFactor(0);
loader.currentItem()->setScrollOffset(ScrollOffset(0, 400));
+ loader.currentItem()->setDidSaveScrollOrScaleState(true);
majidvp 2017/02/15 17:37:32 ditto.
// FrameLoader::restoreScrollPositionAndViewState flows differently if scale
// is zero.

Powered by Google App Engine
This is Rietveld 408576698