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

Unified Diff: Source/platform/scroll/ScrollableAreaTest.cpp

Issue 1150003003: Cleanup ScrollableArea scrolling API (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: 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/platform/scroll/ScrollableArea.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/scroll/ScrollableAreaTest.cpp
diff --git a/Source/platform/scroll/ScrollableAreaTest.cpp b/Source/platform/scroll/ScrollableAreaTest.cpp
index d5b52199b8d34da57cda11081868f063f39cad91..21d6984e99f72f7f30e493252e118c3633b8a2db 100644
--- a/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -30,7 +30,6 @@ public:
MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&));
MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&));
MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*());
- MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint());
MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect));
MOCK_CONST_METHOD0(contentsSize, IntSize());
MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool());
@@ -40,6 +39,7 @@ public:
virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
virtual void setScrollOffset(const IntPoint& offset, ScrollType) override { m_scrollPosition = offset.shrunkTo(m_maximumScrollPosition); }
virtual IntPoint scrollPosition() const override { return m_scrollPosition; }
+ virtual IntPoint minimumScrollPosition() const override { return IntPoint(); }
virtual IntPoint maximumScrollPosition() const override { return m_maximumScrollPosition; }
virtual int visibleHeight() const override { return 768; }
virtual int visibleWidth() const override { return 1024; }
@@ -117,7 +117,7 @@ private:
TEST_F(ScrollableAreaTest, ScrollAnimatorCurrentPositionShouldBeSync)
{
MockScrollableArea scrollableArea(IntPoint(0, 100));
- scrollableArea.notifyScrollPositionChanged(IntPoint(0, 10000));
+ scrollableArea.setScrollPosition(IntPoint(0, 10000), CompositorScroll);
EXPECT_EQ(100.0, scrollableArea.scrollAnimator()->currentPosition().y());
}
« no previous file with comments | « Source/platform/scroll/ScrollableArea.cpp ('k') | Source/web/WebLocalFrameImpl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698