Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(367)

Side by Side Diff: Source/WebKit/chromium/tests/WebCompositorInputHandlerImplTest.cpp

Issue 13880009: Include timestamp with vsync-delineating input events (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Rebased. Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/WebKit/chromium/src/WebCompositorInputHandlerImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698