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

Side by Side Diff: content/renderer/gpu/input_handler_proxy_unittest.cc

Issue 15058004: cc: Rename VSync to BeginFrame (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase Created 7 years, 7 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/gpu/input_handler_proxy.h" 5 #include "content/renderer/gpu/input_handler_proxy.h"
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/renderer/gpu/input_handler_proxy_client.h" 9 #include "content/renderer/gpu/input_handler_proxy_client.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 ScrollStatus(gfx::Point viewport_point, 42 ScrollStatus(gfx::Point viewport_point,
43 cc::InputHandler::ScrollInputType type)); 43 cc::InputHandler::ScrollInputType type));
44 MOCK_METHOD2(ScrollBy, 44 MOCK_METHOD2(ScrollBy,
45 bool(gfx::Point viewport_point, gfx::Vector2dF scroll_delta)); 45 bool(gfx::Point viewport_point, gfx::Vector2dF scroll_delta));
46 MOCK_METHOD2(ScrollVerticallyByPage, 46 MOCK_METHOD2(ScrollVerticallyByPage,
47 bool(gfx::Point viewport_point, 47 bool(gfx::Point viewport_point,
48 cc::ScrollDirection direction)); 48 cc::ScrollDirection direction));
49 MOCK_METHOD0(ScrollEnd, void()); 49 MOCK_METHOD0(ScrollEnd, void());
50 MOCK_METHOD0(FlingScrollBegin, cc::InputHandler::ScrollStatus()); 50 MOCK_METHOD0(FlingScrollBegin, cc::InputHandler::ScrollStatus());
51 51
52 MOCK_METHOD1(DidReceiveLastInputEventForVSync, void(base::TimeTicks time)); 52 MOCK_METHOD1(DidReceiveLastInputEventForBeginFrame,
53 void(base::TimeTicks time));
53 54
54 virtual void BindToClient(cc::InputHandlerClient* client) OVERRIDE {} 55 virtual void BindToClient(cc::InputHandlerClient* client) OVERRIDE {}
55 56
56 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset, 57 virtual void StartPageScaleAnimation(gfx::Vector2d target_offset,
57 bool anchor_point, 58 bool anchor_point,
58 float page_scale, 59 float page_scale,
59 base::TimeTicks start_time, 60 base::TimeTicks start_time,
60 base::TimeDelta duration) OVERRIDE {} 61 base::TimeDelta duration) OVERRIDE {}
61 62
62 virtual void NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) OVERRIDE {} 63 virtual void NotifyCurrentFlingVelocity(gfx::Vector2dF velocity) OVERRIDE {}
(...skipping 921 matching lines...) Expand 10 before | Expand all | Expand 10 after
984 TEST_F(InputHandlerProxyTest, LastInputEventForVSync) { 985 TEST_F(InputHandlerProxyTest, LastInputEventForVSync) {
985 expected_disposition_ = DropEvent; 986 expected_disposition_ = DropEvent;
986 VERIFY_AND_RESET_MOCKS(); 987 VERIFY_AND_RESET_MOCKS();
987 988
988 gesture_.type = WebInputEvent::GestureFlingCancel; 989 gesture_.type = WebInputEvent::GestureFlingCancel;
989 gesture_.timeStampSeconds = 1234; 990 gesture_.timeStampSeconds = 1234;
990 base::TimeTicks time = 991 base::TimeTicks time =
991 base::TimeTicks() + 992 base::TimeTicks() +
992 base::TimeDelta::FromSeconds(gesture_.timeStampSeconds); 993 base::TimeDelta::FromSeconds(gesture_.timeStampSeconds);
993 gesture_.modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync; 994 gesture_.modifiers |= WebInputEvent::IsLastInputEventForCurrentVSync;
994 EXPECT_CALL(mock_input_handler_, DidReceiveLastInputEventForVSync(time)); 995 EXPECT_CALL(mock_input_handler_, DidReceiveLastInputEventForBeginFrame(time));
995 input_handler_->HandleInputEvent(gesture_); 996 input_handler_->HandleInputEvent(gesture_);
996 } 997 }
997 998
998 } // namespace 999 } // namespace
OLDNEW
« no previous file with comments | « content/renderer/gpu/input_handler_proxy.cc ('k') | content/renderer/gpu/render_widget_compositor.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698