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

Unified Diff: ui/events/devices/x11/device_data_manager_x11_unittest.cc

Issue 1073573002: Ozone support for device special cases in keyboard event rewriting. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: white space Created 5 years, 8 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
Index: ui/events/devices/x11/device_data_manager_x11_unittest.cc
diff --git a/ui/events/devices/x11/device_data_manager_x11_unittest.cc b/ui/events/devices/x11/device_data_manager_x11_unittest.cc
index 444611f4fcc6b25da67d9168c54d9ba1020fce74..a2e8c3e98526ab69985ca287179c5e27c8b4afc9 100644
--- a/ui/events/devices/x11/device_data_manager_x11_unittest.cc
+++ b/ui/events/devices/x11/device_data_manager_x11_unittest.cc
@@ -77,10 +77,10 @@ TEST_F(DeviceDataManagerX11Test, NotifyOnDisable) {
DeviceDataManagerX11* manager = DeviceDataManagerX11::GetInstance();
TestInputDeviceObserver observer(manager);
std::vector<ui::KeyboardDevice> keyboards;
- keyboards.push_back(
- ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
- keyboards.push_back(
- ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ keyboards.push_back(ui::KeyboardDevice(
+ 1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ keyboards.push_back(ui::KeyboardDevice(
+ 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
SetKeyboardDevices(keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -108,10 +108,10 @@ TEST_F(DeviceDataManagerX11Test, TestMultipleDisable) {
DeviceDataManagerX11* manager = DeviceDataManagerX11::GetInstance();
TestInputDeviceObserver observer(manager);
std::vector<ui::KeyboardDevice> keyboards;
- keyboards.push_back(
- ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
- keyboards.push_back(
- ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ keyboards.push_back(ui::KeyboardDevice(
+ 1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ keyboards.push_back(ui::KeyboardDevice(
+ 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
SetKeyboardDevices(keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -147,10 +147,10 @@ TEST_F(DeviceDataManagerX11Test, UnblockOnDeviceUnplugged) {
DeviceDataManagerX11* manager = DeviceDataManagerX11::GetInstance();
TestInputDeviceObserver observer(manager);
std::vector<ui::KeyboardDevice> all_keyboards;
- all_keyboards.push_back(
- ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
- all_keyboards.push_back(
- ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ all_keyboards.push_back(ui::KeyboardDevice(
+ 1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ all_keyboards.push_back(ui::KeyboardDevice(
+ 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
SetKeyboardDevices(all_keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -165,8 +165,8 @@ TEST_F(DeviceDataManagerX11Test, UnblockOnDeviceUnplugged) {
// Unplug the disabled device. Should not be notified, since the active list
// did not change.
std::vector<ui::KeyboardDevice> subset_keyboards;
- subset_keyboards.push_back(
- ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ subset_keyboards.push_back(ui::KeyboardDevice(
+ 1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
SetKeyboardDevices(subset_keyboards);
EXPECT_FALSE(observer.change_notified());
// Replug in the first device. Should be notified of the new device.

Powered by Google App Engine
This is Rietveld 408576698