| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 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 | 59 |
| 60 MOCK_METHOD0(scheduleAnimation, void()); | 60 MOCK_METHOD0(scheduleAnimation, void()); |
| 61 | 61 |
| 62 MOCK_METHOD1(haveTouchEventHandlersAt, bool(WebPoint)); | 62 MOCK_METHOD1(haveTouchEventHandlersAt, bool(WebPoint)); |
| 63 | 63 |
| 64 MOCK_METHOD2(scrollBegin, ScrollStatus(WebPoint, WebInputHandlerClient::Scro
llInputType)); | 64 MOCK_METHOD2(scrollBegin, ScrollStatus(WebPoint, WebInputHandlerClient::Scro
llInputType)); |
| 65 MOCK_METHOD2(scrollByIfPossible, bool(WebPoint, WebFloatSize)); | 65 MOCK_METHOD2(scrollByIfPossible, bool(WebPoint, WebFloatSize)); |
| 66 MOCK_METHOD2(scrollVerticallyByPageIfPossible, bool(WebPoint, WebScrollbar::
ScrollDirection)); | 66 MOCK_METHOD2(scrollVerticallyByPageIfPossible, bool(WebPoint, WebScrollbar::
ScrollDirection)); |
| 67 MOCK_METHOD0(scrollEnd, void()); | 67 MOCK_METHOD0(scrollEnd, void()); |
| 68 | 68 |
| 69 MOCK_METHOD0(didReceiveLastInputEventForVSync, void()); | 69 MOCK_METHOD1(didReceiveLastInputEventForVSync, void(double)); |
| 70 | 70 |
| 71 private: | 71 private: |
| 72 virtual void startPageScaleAnimation(WebSize targetPosition, | 72 virtual void startPageScaleAnimation(WebSize targetPosition, |
| 73 bool anchorPoint, | 73 bool anchorPoint, |
| 74 float pageScale, | 74 float pageScale, |
| 75 double startTimeMs, | 75 double startTimeMs, |
| 76 double durationMs) OVERRIDE { } | 76 double durationMs) OVERRIDE { } |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 class MockWebCompositorInputHandlerClient : public WebCompositorInputHandlerClie
nt { | 79 class MockWebCompositorInputHandlerClient : public WebCompositorInputHandlerClie
nt { |
| (...skipping 741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 821 // the fling has finished (note no GestureScrollEnd has been sent). | 821 // the fling has finished (note no GestureScrollEnd has been sent). |
| 822 ASSERT(!m_inputHandler->isGestureScrollOnImplThread()); | 822 ASSERT(!m_inputHandler->isGestureScrollOnImplThread()); |
| 823 } | 823 } |
| 824 | 824 |
| 825 TEST_F(WebCompositorInputHandlerImplTest, lastInputEventForVSync) | 825 TEST_F(WebCompositorInputHandlerImplTest, lastInputEventForVSync) |
| 826 { | 826 { |
| 827 m_expectedDisposition = DropEvent; | 827 m_expectedDisposition = DropEvent; |
| 828 VERIFY_AND_RESET_MOCKS(); | 828 VERIFY_AND_RESET_MOCKS(); |
| 829 | 829 |
| 830 gesture.type = WebInputEvent::GestureFlingCancel; | 830 gesture.type = WebInputEvent::GestureFlingCancel; |
| 831 gesture.timeStampSeconds = 1234; |
| 831 gesture.modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync; | 832 gesture.modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync; |
| 832 EXPECT_CALL(m_mockInputHandlerClient, didReceiveLastInputEventForVSync()); | 833 EXPECT_CALL(m_mockInputHandlerClient, didReceiveLastInputEventForVSync(gestu
re.timeStampSeconds)); |
| 833 m_inputHandler->handleInputEvent(gesture); | 834 m_inputHandler->handleInputEvent(gesture); |
| 834 } | 835 } |
| 835 | 836 |
| 836 } | 837 } |
| OLD | NEW |