| 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 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 49 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } | 49 : m_scrollAnimatorEnabled(scrollAnimatorEnabled) { } |
| 50 | 50 |
| 51 MOCK_CONST_METHOD0(isActive, bool()); | 51 MOCK_CONST_METHOD0(isActive, bool()); |
| 52 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); | 52 MOCK_CONST_METHOD1(scrollSize, int(ScrollbarOrientation)); |
| 53 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); | 53 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); |
| 54 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); | 54 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); |
| 55 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); | 55 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); |
| 56 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); | 56 MOCK_METHOD2(setScrollOffset, void(const IntPoint&, ScrollType)); |
| 57 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); | 57 MOCK_METHOD2(invalidateScrollbarRect, void(Scrollbar*, const IntRect&)); |
| 58 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); | 58 MOCK_METHOD1(invalidateScrollCornerRect, void(const IntRect&)); |
| 59 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); | |
| 60 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 59 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
| 61 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 60 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
| 62 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 61 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
| 63 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); | 62 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); |
| 64 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 63 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
| 65 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 64 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
| 66 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 65 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
| 67 | 66 |
| 68 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu
rn true; } | 67 virtual bool userInputScrollable(ScrollbarOrientation) const override { retu
rn true; } |
| 69 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa
lse; } | 68 virtual bool shouldPlaceVerticalScrollbarOnLeft() const override { return fa
lse; } |
| (...skipping 977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1047 EXPECT_TRUE(result); | 1046 EXPECT_TRUE(result); |
| 1048 result = result && animateScroll(t); | 1047 result = result && animateScroll(t); |
| 1049 double after = m_currentPosition; | 1048 double after = m_currentPosition; |
| 1050 EXPECT_GE(before, after); | 1049 EXPECT_GE(before, after); |
| 1051 | 1050 |
| 1052 t += kAnimationTime; | 1051 t += kAnimationTime; |
| 1053 for (; result && t < kEndTime; t += kAnimationTime) | 1052 for (; result && t < kEndTime; t += kAnimationTime) |
| 1054 result = result && animateScroll(t); | 1053 result = result && animateScroll(t); |
| 1055 EXPECT_GE(before, m_currentPosition); | 1054 EXPECT_GE(before, m_currentPosition); |
| 1056 } | 1055 } |
| OLD | NEW |