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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 1163433003: Remove WebViewImpl helper methods for setting scroll offset. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Renamed outerViewport to layoutViewport Created 5 years, 7 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
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebWidget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index 0361490b837500926e9007fa9139a8f2227723f2..9cc521edf56cfa56b44b505af617aff1472206d0 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -1158,7 +1158,7 @@ TEST_F(WebViewTest, HistoryResetScrollAndScaleState)
// Make the page scale and scroll with the given paremeters.
webViewImpl->setPageScaleFactor(2.0f);
- webViewImpl->setMainFrameScrollOffset(WebPoint(94, 111));
+ webViewImpl->mainFrame()->setScrollOffset(WebSize(94, 111));
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width);
EXPECT_EQ(111, webViewImpl->mainFrame()->scrollOffset().height);
@@ -1188,7 +1188,7 @@ TEST_F(WebViewTest, BackForwardRestoreScroll)
webViewImpl->layout();
// Emulate a user scroll
- webViewImpl->setMainFrameScrollOffset(WebPoint(0, 900));
+ webViewImpl->mainFrame()->setScrollOffset(WebSize(0, 900));
LocalFrame* mainFrameLocal = toLocalFrame(webViewImpl->page()->mainFrame());
RefPtrWillBePersistent<HistoryItem> item1 = mainFrameLocal->loader().currentItem();
@@ -1224,7 +1224,7 @@ TEST_F(WebViewTest, EnterFullscreenResetScrollAndScaleState)
// Make the page scale and scroll with the given paremeters.
webViewImpl->setPageScaleFactor(2.0f);
- webViewImpl->setMainFrameScrollOffset(WebPoint(94, 111));
+ webViewImpl->mainFrame()->setScrollOffset(WebSize(94, 111));
webViewImpl->setPinchViewportOffset(WebFloatPoint(12, 20));
EXPECT_EQ(2.0f, webViewImpl->pageScaleFactor());
EXPECT_EQ(94, webViewImpl->mainFrame()->scrollOffset().width);
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | public/web/WebWidget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698