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&)); | |
56 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); | 55 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); |
57 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); | 56 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); |
58 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); | 57 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); |
59 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); | 58 MOCK_METHOD0(scrollControlWasSetNeedsPaintInvalidation, void()); |
60 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); | |
61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 59 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 60 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
63 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 61 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
64 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); | 62 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); |
65 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 63 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
66 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 64 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
67 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 65 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
68 | 66 |
69 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} | 67 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} |
70 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } | 68 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } |
(...skipping 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1086 double after = m_currentPosition; | 1084 double after = m_currentPosition; |
1087 EXPECT_GE(before, after); | 1085 EXPECT_GE(before, after); |
1088 | 1086 |
1089 t += kAnimationTime; | 1087 t += kAnimationTime; |
1090 for (; result && t < kEndTime; t += kAnimationTime) | 1088 for (; result && t < kEndTime; t += kAnimationTime) |
1091 result = result && animateScroll(t); | 1089 result = result && animateScroll(t); |
1092 EXPECT_GE(before, m_currentPosition); | 1090 EXPECT_GE(before, m_currentPosition); |
1093 } | 1091 } |
1094 | 1092 |
1095 } // namespace blink | 1093 } // namespace blink |
OLD | NEW |