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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); | 55 MOCK_METHOD2(invalidateScrollbar, void(Scrollbar*, const IntRect&)); |
56 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); | 56 MOCK_CONST_METHOD0(isScrollCornerVisible, bool()); |
57 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); | 57 MOCK_CONST_METHOD0(scrollCornerRect, IntRect()); |
58 MOCK_METHOD1(setScrollOffset, void(const IntPoint&)); | 58 MOCK_METHOD1(setScrollOffset, void(const IntPoint&)); |
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_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); | 61 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); |
62 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 62 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
63 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 63 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
64 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 64 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
65 MOCK_CONST_METHOD1(visibleContentRect, IntRect(VisibleContentRectIncludesScr
ollbars)); | 65 MOCK_CONST_METHOD1(visibleContentRect, IntRect(IncludeScrollbarsInRect)); |
66 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 66 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
67 MOCK_CONST_METHOD0(overhangAmount, IntSize()); | 67 MOCK_CONST_METHOD0(overhangAmount, IntSize()); |
68 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 68 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
69 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 69 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
70 | 70 |
71 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu
rn true; } | 71 virtual bool userInputScrollable(ScrollbarOrientation) const OVERRIDE { retu
rn true; } |
72 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE { return fa
lse; } | 72 virtual bool shouldPlaceVerticalScrollbarOnLeft() const OVERRIDE { return fa
lse; } |
73 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); } | 73 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); } |
74 virtual int visibleHeight() const OVERRIDE { return 768; } | 74 virtual int visibleHeight() const OVERRIDE { return 768; } |
75 virtual int visibleWidth() const OVERRIDE { return 1024; } | 75 virtual int visibleWidth() const OVERRIDE { return 1024; } |
(...skipping 965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1041 EXPECT_TRUE(result); | 1041 EXPECT_TRUE(result); |
1042 result = result && animateScroll(t); | 1042 result = result && animateScroll(t); |
1043 double after = m_currentPosition; | 1043 double after = m_currentPosition; |
1044 EXPECT_GE(before, after); | 1044 EXPECT_GE(before, after); |
1045 | 1045 |
1046 t += kAnimationTime; | 1046 t += kAnimationTime; |
1047 for (; result && t < kEndTime; t += kAnimationTime) | 1047 for (; result && t < kEndTime; t += kAnimationTime) |
1048 result = result && animateScroll(t); | 1048 result = result && animateScroll(t); |
1049 EXPECT_GE(before, m_currentPosition); | 1049 EXPECT_GE(before, m_currentPosition); |
1050 } | 1050 } |
OLD | NEW |