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

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

Issue 2628683003: Add DidSaveScrollOrScaleState flag to prevent restoreScrollPositionAndViewState restore from default (Closed)
Patch Set: remove checkComplete call in loadInSameDocument Created 3 years, 11 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 e15730c253a0549e7dcd333083fad1a7c5bfddd5..2b4a2d79dd1ab782bf5623c880b0f3f9f6313025 100644
--- a/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
@@ -62,7 +62,7 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithScale) {
// setPageScaleFactor because otherwise
// FrameLoader::restoreScrollPositionAndViewState does nothing.
loader.documentLoader()->initialScrollState().wasScrolledByUser = false;
- loader.restoreScrollPositionAndViewState();
+ loader.setScrollFromNavigation(NavigationToDifferentDocument);
// Expect that both scroll and scale were restored.
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
@@ -90,7 +90,7 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithoutScale) {
// FrameLoader::restoreScrollPositionAndViewState flows differently if scale
// is zero.
- loader.restoreScrollPositionAndViewState();
+ loader.setScrollFromNavigation(NavigationToDifferentDocument);
// Expect that only the scroll position was restored.
EXPECT_EQ(3.0f, webViewImpl->pageScaleFactor());

Powered by Google App Engine
This is Rietveld 408576698