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

Side by Side Diff: Source/web/tests/ScrollAnimatorNoneTest.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 unified diff | Download patch
« no previous file with comments | « Source/web/tests/PinchViewportTest.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 7 *
8 * 1. Redistributions of source code must retain the above copyright 8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright 10 * 2. Redistributions in binary form must reproduce the above copyright
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
48 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } 48 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { }
49 49
50 MOCK_CONST_METHOD0(isActive, bool()); 50 MOCK_CONST_METHOD0(isActive, bool());
51 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); 51 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation));
52 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); 52 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&));
53 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); 53 MOCK_CONST_METHOD0(isScrollCornerVisible, bool());
54 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); 54 MOCK_CONST_METHOD0(scrollCornerRect, IntRect());
55 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); 55 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType));
56 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); 56 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&));
57 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); 57 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&));
58 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&));
59 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); 58 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*());
60 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); 59 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint());
61 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); 60 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint());
62 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); 61 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect));
63 MOCK_CONST_METHOD0(contentsSize, IntSize()); 62 MOCK_CONST_METHOD0(contentsSize, IntSize());
64 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); 63 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool());
65 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); 64 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect());
66 65
67 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu rn true; } 66 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu rn true; }
68 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa lse; } 67 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa lse; }
(...skipping 979 matching lines...) Expand 10 before | Expand all | Expand 10 after
1048 double after = m_currentPosition; 1047 double after = m_currentPosition;
1049 EXPECT_GE(before, after); 1048 EXPECT_GE(before, after);
1050 1049
1051 t += kAnimationTime; 1050 t += kAnimationTime;
1052 for (; result && t < kEndTime; t += kAnimationTime) 1051 for (; result && t < kEndTime; t += kAnimationTime)
1053 result = result && animateScroll(t); 1052 result = result && animateScroll(t);
1054 EXPECT_GE(before, m_currentPosition); 1053 EXPECT_GE(before, m_currentPosition);
1055 } 1054 }
1056 1055
1057 } // namespace blink 1056 } // namespace blink
OLDNEW
« no previous file with comments | « Source/web/tests/PinchViewportTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698