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

Unified Diff: remoting/host/remote_input_filter_unittest.cc

Issue 10894050: Remove support for Windows-style keycodes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Linux EventExecutor typo. Created 8 years, 3 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/host/event_executor_win.cc ('k') | remoting/proto/event.proto » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/remote_input_filter_unittest.cc
diff --git a/remoting/host/remote_input_filter_unittest.cc b/remoting/host/remote_input_filter_unittest.cc
index 079a1c99fca2c93eeda1c8ba655a88b706695907..94fb360edcce50dc6e572e88bfb7c2e0d340b315 100644
--- a/remoting/host/remote_input_filter_unittest.cc
+++ b/remoting/host/remote_input_filter_unittest.cc
@@ -19,8 +19,9 @@ namespace remoting {
using protocol::MockInputStub;
using protocol::InputEventTracker;
-MATCHER_P2(EqualsKeyEvent, keycode, pressed, "") {
- return arg.keycode() == keycode && arg.pressed() == pressed;
+MATCHER_P2(EqualsUsbEvent, usb_keycode, pressed, "") {
+ return arg.usb_keycode() == (unsigned int)usb_keycode &&
+ arg.pressed() == pressed;
}
static protocol::MouseEvent MouseMoveEvent(int x, int y) {
@@ -30,9 +31,9 @@ static protocol::MouseEvent MouseMoveEvent(int x, int y) {
return event;
}
-static protocol::KeyEvent KeyEvent(int keycode, bool pressed) {
+static protocol::KeyEvent UsbKeyEvent(int usb_keycode, bool pressed) {
protocol::KeyEvent event;
- event.set_keycode(keycode);
+ event.set_usb_keycode(usb_keycode);
event.set_pressed(pressed);
return event;
}
@@ -109,9 +110,9 @@ TEST(RemoteInputFilterTest, LocalActivityReleasesAll) {
// Use release of a key as a proxy for InputEventTracker::ReleaseAll()
// having been called, rather than mocking it.
- EXPECT_CALL(mock_stub, InjectKeyEvent(EqualsKeyEvent(0, true)));
- EXPECT_CALL(mock_stub, InjectKeyEvent(EqualsKeyEvent(0, false)));
- input_filter.InjectKeyEvent(KeyEvent(0, true));
+ EXPECT_CALL(mock_stub, InjectKeyEvent(EqualsUsbEvent(0, true)));
+ EXPECT_CALL(mock_stub, InjectKeyEvent(EqualsUsbEvent(0, false)));
+ input_filter.InjectKeyEvent(UsbKeyEvent(0, true));
for (int i = 0; i < 10; ++i) {
input_filter.InjectMouseEvent(MouseMoveEvent(0, 0));
« no previous file with comments | « remoting/host/event_executor_win.cc ('k') | remoting/proto/event.proto » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698