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..8518e36bbb276a9f57e0907ec2944bfed5bdc48f 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,19 +15,6 @@ 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; |
-} |
- |
static KeyEvent NewKeyEvent(uint32 usb_keycode, bool pressed) { |
KeyEvent event; |
event.set_usb_keycode(usb_keycode); |
@@ -64,8 +52,8 @@ TEST(InputFilterTest, EventsPassThroughFilter) { |
testing::StrictMock<MockInputStub> input_stub; |
InputFilter input_filter(&input_stub); |
- EXPECT_CALL(input_stub, InjectKeyEvent(EqualsKeyEvent(0, true))); |
- EXPECT_CALL(input_stub, InjectKeyEvent(EqualsKeyEvent(0, false))); |
+ EXPECT_CALL(input_stub, InjectKeyEvent(EqualsUsbEvent(0, true))); |
+ EXPECT_CALL(input_stub, InjectKeyEvent(EqualsUsbEvent(0, false))); |
EXPECT_CALL(input_stub, InjectTextEvent(EqualsTextEvent("test"))); |
EXPECT_CALL(input_stub, InjectMouseEvent(EqualsMouseMoveEvent(10, 20))); |
@@ -88,5 +76,5 @@ TEST(InputFilterTest, IgnoreEventsIfNotConfigured) { |
InjectTestSequence(&input_filter); |
} |
-} // namespace protocol |
-} // namespace remoting |
+} // namespace protocol |
+} // namespace remoting |