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

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

Issue 2710983003: Move HistoryItem handling to DocumentLoader (Closed)
Patch Set: Address kinuko's comments Created 3 years, 9 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..829854a37cd727e76dc3dc43e2400e6af047510f 100644
--- a/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
+++ b/third_party/WebKit/Source/web/tests/ProgrammaticScrollTest.cpp
@@ -56,8 +56,8 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithScale) {
webViewImpl->setPageScaleFactor(3.0f);
webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 500));
loader.documentLoader()->initialScrollState().wasScrolledByUser = false;
- loader.currentItem()->setPageScaleFactor(2);
- loader.currentItem()->setScrollOffset(ScrollOffset(0, 200));
+ loader.documentLoader()->historyItem()->setPageScaleFactor(2);
+ loader.documentLoader()->historyItem()->setScrollOffset(ScrollOffset(0, 200));
// Flip back the wasScrolledByUser flag which was set to true by
// setPageScaleFactor because otherwise
@@ -86,8 +86,8 @@ TEST_F(ProgrammaticScrollTest, RestoreScrollPositionAndViewStateWithoutScale) {
webViewImpl->setPageScaleFactor(3.0f);
webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 500));
loader.documentLoader()->initialScrollState().wasScrolledByUser = false;
- loader.currentItem()->setPageScaleFactor(0);
- loader.currentItem()->setScrollOffset(ScrollOffset(0, 400));
+ loader.documentLoader()->historyItem()->setPageScaleFactor(0);
+ loader.documentLoader()->historyItem()->setScrollOffset(ScrollOffset(0, 400));
// FrameLoader::restoreScrollPositionAndViewState flows differently if scale
// is zero.
« no previous file with comments | « third_party/WebKit/Source/web/WebLocalFrameImpl.cpp ('k') | third_party/WebKit/Source/web/tests/VisualViewportTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698