| 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 62 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); | 62 MOCK_METHOD1(setScrollOffsetFromAnimation, void(const IntPoint&)); |
| 63 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); | 63 MOCK_CONST_METHOD0(enclosingScrollableArea, ScrollableArea*()); |
| 64 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); | 64 MOCK_CONST_METHOD0(minimumScrollPosition, IntPoint()); |
| 65 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); | 65 MOCK_CONST_METHOD0(maximumScrollPosition, IntPoint()); |
| 66 MOCK_CONST_METHOD1(visibleContentRect, IntRect(VisibleContentRectIncludesScr
ollbars)); | 66 MOCK_CONST_METHOD1(visibleContentRect, IntRect(VisibleContentRectIncludesScr
ollbars)); |
| 67 MOCK_CONST_METHOD0(contentsSize, IntSize()); | 67 MOCK_CONST_METHOD0(contentsSize, IntSize()); |
| 68 MOCK_CONST_METHOD0(overhangAmount, IntSize()); | 68 MOCK_CONST_METHOD0(overhangAmount, IntSize()); |
| 69 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); | 69 MOCK_CONST_METHOD0(scrollbarsCanBeActive, bool()); |
| 70 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); | 70 MOCK_CONST_METHOD0(scrollableAreaBoundingBox, IntRect()); |
| 71 | 71 |
| 72 virtual bool isHorizontallyScrollable() const OVERRIDE { return true; } |
| 73 virtual bool isVerticallyScrollable() const OVERRIDE { return true; } |
| 72 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); } | 74 virtual IntPoint scrollPosition() const OVERRIDE { return IntPoint(); } |
| 73 virtual int visibleHeight() const OVERRIDE { return 768; } | 75 virtual int visibleHeight() const OVERRIDE { return 768; } |
| 74 virtual int visibleWidth() const OVERRIDE { return 1024; } | 76 virtual int visibleWidth() const OVERRIDE { return 1024; } |
| 75 virtual bool scrollAnimatorEnabled() const OVERRIDE { return m_scrollAnimato
rEnabled; } | 77 virtual bool scrollAnimatorEnabled() const OVERRIDE { return m_scrollAnimato
rEnabled; } |
| 76 | 78 |
| 77 private: | 79 private: |
| 78 bool m_scrollAnimatorEnabled; | 80 bool m_scrollAnimatorEnabled; |
| 79 }; | 81 }; |
| 80 | 82 |
| 81 class MockScrollAnimatorNone : public ScrollAnimatorNone { | 83 class MockScrollAnimatorNone : public ScrollAnimatorNone { |
| (...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1039 EXPECT_TRUE(result); | 1041 EXPECT_TRUE(result); |
| 1040 result = result && animateScroll(t); | 1042 result = result && animateScroll(t); |
| 1041 double after = m_currentPosition; | 1043 double after = m_currentPosition; |
| 1042 EXPECT_GE(before, after); | 1044 EXPECT_GE(before, after); |
| 1043 | 1045 |
| 1044 t += kAnimationTime; | 1046 t += kAnimationTime; |
| 1045 for (; result && t < kEndTime; t += kAnimationTime) | 1047 for (; result && t < kEndTime; t += kAnimationTime) |
| 1046 result = result && animateScroll(t); | 1048 result = result && animateScroll(t); |
| 1047 EXPECT_GE(before, m_currentPosition); | 1049 EXPECT_GE(before, m_currentPosition); |
| 1048 } | 1050 } |
| OLD | NEW |