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

Side by Side Diff: remoting/protocol/mouse_input_filter_unittest.cc

Issue 985863002: Move all protocol event matchers to test_event_matchers.h (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 5 years, 9 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 | « remoting/protocol/input_filter_unittest.cc ('k') | remoting/protocol/test_event_matchers.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "remoting/protocol/mouse_input_filter.h" 5 #include "remoting/protocol/mouse_input_filter.h"
6 6
7 #include "remoting/proto/event.pb.h" 7 #include "remoting/proto/event.pb.h"
8 #include "remoting/protocol/protocol_mock_objects.h" 8 #include "remoting/protocol/protocol_mock_objects.h"
9 #include "remoting/protocol/test_event_matchers.h"
9 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
10 #include "testing/gtest/include/gtest/gtest.h" 11 #include "testing/gtest/include/gtest/gtest.h"
11 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h" 12 #include "third_party/webrtc/modules/desktop_capture/desktop_geometry.h"
12 13
13 using ::testing::_; 14 using ::testing::_;
14 using ::testing::InSequence; 15 using ::testing::InSequence;
15 16
16 namespace remoting { 17 namespace remoting {
17 namespace protocol { 18 namespace protocol {
18 19
19 MATCHER_P2(EqualsMouseMoveEvent, x, y, "") { 20 using test::EqualsMouseMoveEvent;
20 return arg.x() == x && arg.y() == y;
21 }
22 21
23 static MouseEvent MouseMoveEvent(int x, int y) { 22 static MouseEvent MouseMoveEvent(int x, int y) {
24 MouseEvent event; 23 MouseEvent event;
25 event.set_x(x); 24 event.set_x(x);
26 event.set_y(y); 25 event.set_y(y);
27 return event; 26 return event;
28 } 27 }
29 28
30 static void InjectTestSequence(InputStub* input_stub) { 29 static void InjectTestSequence(InputStub* input_stub) {
31 struct Point { 30 struct Point {
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 EXPECT_CALL(mock_stub, InjectMouseEvent(EqualsMouseMoveEvent(19, 11))). 159 EXPECT_CALL(mock_stub, InjectMouseEvent(EqualsMouseMoveEvent(19, 11))).
161 Times(1); 160 Times(1);
162 161
163 } 162 }
164 163
165 InjectTestSequence(&mouse_filter); 164 InjectTestSequence(&mouse_filter);
166 } 165 }
167 166
168 } // namespace protocol 167 } // namespace protocol
169 } // namespace remoting 168 } // namespace remoting
OLDNEW
« no previous file with comments | « remoting/protocol/input_filter_unittest.cc ('k') | remoting/protocol/test_event_matchers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698