Fix test for master device.
BUG=406014
[email protected]
Committed: https://crrev.com/817ca9b5c2145d843f6ff154926db79535974778
Cr-Commit-Position: refs/heads/master@{#293781}
Review URL: https://codereview.chromium.org/538143002
Cr-Commit-Position: refs/heads/master@{#294385}
diff --git a/chrome/browser/chromeos/events/event_rewriter_unittest.cc b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
index db71419..261c837 100644
--- a/chrome/browser/chromeos/events/event_rewriter_unittest.cc
+++ b/chrome/browser/chromeos/events/event_rewriter_unittest.cc
@@ -46,6 +46,7 @@
// The device id of the test touchpad device.
const unsigned int kTouchPadDeviceId = 1;
const int kKeyboardDeviceId = 2;
+const int kMasterKeyboardDeviceId = 3;
std::string GetExpectedResultAsString(ui::KeyboardCode ui_keycode,
int ui_flags,
@@ -150,8 +151,11 @@
if (xevent->xkey.keycode)
CheckX11KeyTestCase(expected, rewriter, test, xevent);
// Test an XI2 GenericEvent.
- xev.InitGenericKeyEvent(
- kKeyboardDeviceId, test.type, test.input.key_code, test.input.flags);
+ xev.InitGenericKeyEvent(kMasterKeyboardDeviceId,
+ kKeyboardDeviceId,
+ test.type,
+ test.input.key_code,
+ test.input.flags);
xevent = xev;
DCHECK(xevent->type == GenericEvent);
XIDeviceEvent* xievent = static_cast<XIDeviceEvent*>(xevent->xcookie.data);