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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); | 59 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); |
60 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); | 60 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); |
61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 61 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 62 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
63 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 63 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
64 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); | 64 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); |
65 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 65 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
66 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 66 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
67 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 67 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
68 | 68 |
69 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu
rn true; } | 69 bool userInputScrollable(ScrollbarOrientation) const override { return true;
} |
70 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa
lse; } | 70 bool shouldPlaceVerticalScrollbarOnLeft() const override { return false; } |
71 virtual IntPoint scrollPosition() const override { return IntPoint(); } | 71 IntPoint scrollPosition() const override { return IntPoint(); } |
72 virtual int visibleHeight() const override { return 768; } | 72 int visibleHeight() const override { return 768; } |
73 virtual int visibleWidth() const override { return 1024; } | 73 int visibleWidth() const override { return 1024; } |
74 virtual bool scrollAnimatorEnabled() const override { return m_scrollAnimato
rEnabled; } | 74 bool scrollAnimatorEnabled() const override { return m_scrollAnimatorEnabled
; } |
75 virtual int pageStep(ScrollbarOrientation) const override { return 0; } | 75 int pageStep(ScrollbarOrientation) const override { return 0; } |
76 | 76 |
77 DEFINE_INLINE_VIRTUAL_TRACE() | 77 DEFINE_INLINE_VIRTUAL_TRACE() |
78 { | 78 { |
79 ScrollableArea::trace(visitor); | 79 ScrollableArea::trace(visitor); |
80 } | 80 } |
81 | 81 |
82 private: | 82 private: |
83 explicit MockScrollableArea(bool scrollAnimatorEnabled) | 83 explicit MockScrollableArea(bool scrollAnimatorEnabled) |
84 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } | 84 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } |
85 | 85 |
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1058 double after = m_currentPosition; | 1058 double after = m_currentPosition; |
1059 EXPECT_GE(before, after); | 1059 EXPECT_GE(before, after); |
1060 | 1060 |
1061 t += kAnimationTime; | 1061 t += kAnimationTime; |
1062 for (; result && t < kEndTime; t += kAnimationTime) | 1062 for (; result && t < kEndTime; t += kAnimationTime) |
1063 result = result && animateScroll(t); | 1063 result = result && animateScroll(t); |
1064 EXPECT_GE(before, m_currentPosition); | 1064 EXPECT_GE(before, m_currentPosition); |
1065 } | 1065 } |
1066 | 1066 |
1067 } // namespace blink | 1067 } // namespace blink |
OLD | NEW |