OLD | NEW |
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
45 class MockScrollableArea : public NoBaseWillBeGarbageCollectedFinalized<MockScro
llableArea>, public ScrollableArea { | 45 class MockScrollableArea : public NoBaseWillBeGarbageCollectedFinalized<MockScro
llableArea>, public ScrollableArea { |
46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockScrollableArea); | 46 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(MockScrollableArea); |
47 public: | 47 public: |
48 static PassOwnPtrWillBeRawPtr<MockScrollableArea> create(bool scrollAnimator
Enabled) | 48 static PassOwnPtrWillBeRawPtr<MockScrollableArea> create(bool scrollAnimator
Enabled) |
49 { | 49 { |
50 return adoptPtrWillBeNoop(new MockScrollableArea(scrollAnimatorEnabled))
; | 50 return adoptPtrWillBeNoop(new MockScrollableArea(scrollAnimatorEnabled))
; |
51 } | 51 } |
52 | 52 |
53 MOCK_CONST_METHOD0(isActive, bool()); | 53 MOCK_CONST_METHOD0(isActive, bool()); |
54 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); | 54 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); |
| 55 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); |
55 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); | 56 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); |
56 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); | 57 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); |
57 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); | 58 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); |
58 MOCK_METHOD0(scrollControlWasSetNeedsPaintInvalidation, void()); | 59 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); |
| 60 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); |
59 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
60 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
61 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 63 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
62 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); | 64 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); |
63 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 65 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
64 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 66 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
65 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 67 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
66 | 68 |
67 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} | 69 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} |
68 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } | 70 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1084 double after = m_currentPosition; | 1086 double after = m_currentPosition; |
1085 EXPECT_GE(before, after); | 1087 EXPECT_GE(before, after); |
1086 | 1088 |
1087 t += kAnimationTime; | 1089 t += kAnimationTime; |
1088 for (; result && t < kEndTime; t += kAnimationTime) | 1090 for (; result && t < kEndTime; t += kAnimationTime) |
1089 result = result && animateScroll(t); | 1091 result = result && animateScroll(t); |
1090 EXPECT_GE(before, m_currentPosition); | 1092 EXPECT_GE(before, m_currentPosition); |
1091 } | 1093 } |
1092 | 1094 |
1093 } // namespace blink | 1095 } // namespace blink |
OLD | NEW |