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

Unified Diff: ui/events/x/events_x_unittest.cc

Issue 560853003: Revert of Fix test for master device. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 | « ui/events/test/events_test_utils_x11.cc ('k') | ui/events/x/touch_factory_x11.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/x/events_x_unittest.cc
diff --git a/ui/events/x/events_x_unittest.cc b/ui/events/x/events_x_unittest.cc
index d8e2c8314ca967c1a968f986288e0e14a2279740..e64fc197221e98bb4880becdf07b6d9f7b3e5454 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -517,7 +517,6 @@
DeviceDataManager::GetInstance());
unsigned int blocked_device_id = 1;
unsigned int other_device_id = 2;
- unsigned int master_device_id = 3;
device_data_manager->DisableDevice(blocked_device_id);
scoped_ptr<std::set<KeyboardCode> > excepted_keys(new std::set<KeyboardCode>);
@@ -526,33 +525,17 @@
ScopedXI2Event xev;
// A is not allowed on the blocked keyboard, and should return ET_UNKNOWN.
- xev.InitGenericKeyEvent(master_device_id,
- blocked_device_id,
- ui::ET_KEY_PRESSED,
- ui::VKEY_A,
- 0);
+ xev.InitGenericKeyEvent(blocked_device_id, ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
EXPECT_EQ(ui::ET_UNKNOWN, ui::EventTypeFromNative(xev));
// The B key is allowed as an exception, and should return KEY_PRESSED.
- xev.InitGenericKeyEvent(master_device_id,
- blocked_device_id,
- ui::ET_KEY_PRESSED,
- ui::VKEY_B,
- 0);
+ xev.InitGenericKeyEvent(blocked_device_id, ui::ET_KEY_PRESSED, ui::VKEY_B, 0);
EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
// Both A and B are allowed on an unblocked keyboard device.
- xev.InitGenericKeyEvent(master_device_id,
- other_device_id,
- ui::ET_KEY_PRESSED,
- ui::VKEY_A,
- 0);
+ xev.InitGenericKeyEvent(other_device_id, ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
- xev.InitGenericKeyEvent(master_device_id,
- other_device_id,
- ui::ET_KEY_PRESSED,
- ui::VKEY_B,
- 0);
+ xev.InitGenericKeyEvent(other_device_id, ui::ET_KEY_PRESSED, ui::VKEY_B, 0);
EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
device_data_manager->EnableDevice(blocked_device_id);
@@ -560,11 +543,7 @@
scoped_ptr<std::set<KeyboardCode> >());
// A key returns KEY_PRESSED as per usual now that keyboard was re-enabled.
- xev.InitGenericKeyEvent(master_device_id,
- blocked_device_id,
- ui::ET_KEY_PRESSED,
- ui::VKEY_A,
- 0);
+ xev.InitGenericKeyEvent(blocked_device_id, ui::ET_KEY_PRESSED, ui::VKEY_A, 0);
EXPECT_EQ(ui::ET_KEY_PRESSED, ui::EventTypeFromNative(xev));
}
« no previous file with comments | « ui/events/test/events_test_utils_x11.cc ('k') | ui/events/x/touch_factory_x11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698