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

Unified Diff: remoting/protocol/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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/protocol/input_event_tracker_unittest.cc ('k') | remoting/protocol/mouse_input_filter_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/protocol/input_filter_unittest.cc
diff --git a/remoting/protocol/input_filter_unittest.cc b/remoting/protocol/input_filter_unittest.cc
index 8059cee85cdd8b972d2764af771ff7f0abed31a3..25b02ee683eb8c9ec236c64340c18fc1b9268a0a 100644
--- a/remoting/protocol/input_filter_unittest.cc
+++ b/remoting/protocol/input_filter_unittest.cc
@@ -6,6 +6,7 @@
#include "remoting/proto/event.pb.h"
#include "remoting/protocol/protocol_mock_objects.h"
+#include "remoting/protocol/test_event_matchers.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -14,18 +15,9 @@ using ::testing::_;
namespace remoting {
namespace protocol {
-MATCHER_P2(EqualsKeyEvent, usb_keycode, pressed, "") {
- return arg.usb_keycode() == static_cast<uint32>(usb_keycode) &&
- arg.pressed() == pressed;
-}
-
-MATCHER_P(EqualsTextEvent, text, "") {
- return arg.text() == text;
-}
-
-MATCHER_P2(EqualsMouseMoveEvent, x, y, "") {
- return arg.x() == x && arg.y() == y;
-}
+using test::EqualsKeyEvent;
+using test::EqualsMouseMoveEvent;
+using test::EqualsTextEvent;
static KeyEvent NewKeyEvent(uint32 usb_keycode, bool pressed) {
KeyEvent event;
@@ -88,5 +80,5 @@ TEST(InputFilterTest, IgnoreEventsIfNotConfigured) {
InjectTestSequence(&input_filter);
}
-} // namespace protocol
-} // namespace remoting
+} // namespace protocol
+} // namespace remoting
« no previous file with comments | « remoting/protocol/input_event_tracker_unittest.cc ('k') | remoting/protocol/mouse_input_filter_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698