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

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

Issue 1173053003: Remove ScrollableArea::notifyScrollPositionChanged and cleanup scroll animators. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebase + remove updateScrollbars from FrameView::setScrollPosition 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 848ff8e7ca4d92b475302f196c214ba1a8f46f70..92a897122a9f1b0323489eb95fc07f677942c127 100644
--- a/Source/platform/scroll/ScrollableAreaTest.cpp
+++ b/Source/platform/scroll/ScrollableAreaTest.cpp
@@ -27,7 +27,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());
@@ -37,6 +36,7 @@ public:
bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; }
void setScrollOffset(const IntPoint& offset, ScrollType) override { m_scrollPosition = offset.shrunkTo(m_maximumScrollPosition); }
IntPoint scrollPosition() const override { return m_scrollPosition; }
+ IntPoint minimumScrollPosition() const override { return IntPoint(); }
IntPoint maximumScrollPosition() const override { return m_maximumScrollPosition; }
int visibleHeight() const override { return 768; }
int visibleWidth() const override { return 1024; }
@@ -114,7 +114,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