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

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

Issue 1158673006: Replace various ScrollableArea scroll methods with setScrollPosition (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Build fix Created 5 years, 6 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/PinchViewportTest.cpp ('k') | Source/web/tests/TopControlsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/ScrollAnimatorNoneTest.cpp
diff --git a/Source/web/tests/ScrollAnimatorNoneTest.cpp b/Source/web/tests/ScrollAnimatorNoneTest.cpp
index e3b61758642c76c73432cc419e0500e28d514dfa..75708a97e5aba8f97694f81d525905ed1bd573fe 100644
--- a/Source/web/tests/ScrollAnimatorNoneTest.cpp
+++ b/Source/web/tests/ScrollAnimatorNoneTest.cpp
@@ -53,7 +53,7 @@ public:
MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&));
MOCK_CONST_METHOD0(isScrollCornerVisible, bool());
MOCK_CONST_METHOD0(scrollCornerRect, IntRect());
- MOCK_METHOD1(setScrollOffset, void(const IntPoint&));
+ MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType));
MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&));
MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&));
MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&));
@@ -107,7 +107,6 @@ public:
m_count++;
}
- MOCK_METHOD1(scrollToOffsetWithoutAnimation, void(const FloatPoint&));
private:
explicit MockScrollAnimatorNone(ScrollableArea* scrollableArea)
: ScrollAnimatorNone(scrollableArea) { }
@@ -122,7 +121,7 @@ TEST(ScrollAnimatorEnabled, Enabled)
EXPECT_CALL(scrollableArea, scrollSize(_)).Times(AtLeast(1)).WillRepeatedly(Return(1000));
EXPECT_CALL(scrollableArea, minimumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint()));
EXPECT_CALL(scrollableArea, maximumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint(1000, 1000)));
- EXPECT_CALL(scrollableArea, setScrollOffset(_)).Times(4);
+ EXPECT_CALL(scrollableArea, setScrollOffset(_, _)).Times(4);
scrollAnimatorNone->userScroll(HorizontalScrollbar, ScrollByLine, 100, 1);
EXPECT_NE(100, scrollAnimatorNone->currentX());
@@ -156,7 +155,7 @@ TEST(ScrollAnimatorEnabled, Disabled)
EXPECT_CALL(scrollableArea, minimumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint()));
EXPECT_CALL(scrollableArea, maximumScrollPosition()).Times(AtLeast(1)).WillRepeatedly(Return(IntPoint(1000, 1000)));
- EXPECT_CALL(scrollableArea, setScrollOffset(_)).Times(4);
+ EXPECT_CALL(scrollableArea, setScrollOffset(_, _)).Times(4);
scrollAnimatorNone->userScroll(HorizontalScrollbar, ScrollByLine, 100, 1);
EXPECT_EQ(100, scrollAnimatorNone->currentX());
« no previous file with comments | « Source/web/tests/PinchViewportTest.cpp ('k') | Source/web/tests/TopControlsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698