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

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

Issue 904733002: Remove useless InputDevice::name field (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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/devices/touchscreen_device.cc ('k') | ui/events/ozone/evdev/input_device_factory_evdev.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 8149111e19100644df1226a2257cfcc8e060f2a7..75a43d147a781adc0c80c1ca82b1a3e76d49e1ef 100644
--- a/ui/events/devices/x11/device_data_manager_x11_unittest.cc
+++ b/ui/events/devices/x11/device_data_manager_x11_unittest.cc
@@ -80,10 +80,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, "Keyboard"));
- keyboards.push_back(ui::KeyboardDevice(
- 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ keyboards.push_back(
+ ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ keyboards.push_back(
+ ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
SetKeyboardDevices(keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -111,10 +111,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, "Keyboard"));
- keyboards.push_back(ui::KeyboardDevice(
- 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ keyboards.push_back(
+ ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ keyboards.push_back(
+ ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
SetKeyboardDevices(keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -150,10 +150,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, "Keyboard"));
- all_keyboards.push_back(ui::KeyboardDevice(
- 2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL, "Keyboard"));
+ all_keyboards.push_back(
+ ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
+ all_keyboards.push_back(
+ ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
SetKeyboardDevices(all_keyboards);
EXPECT_TRUE(observer.change_notified());
std::vector<KeyboardDevice> devices = manager->keyboard_devices();
@@ -168,8 +168,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, "Keyboard"));
+ subset_keyboards.push_back(
+ ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL));
SetKeyboardDevices(subset_keyboards);
EXPECT_FALSE(observer.change_notified());
// Replug in the first device. Should be notified of the new device.
« no previous file with comments | « ui/events/devices/touchscreen_device.cc ('k') | ui/events/ozone/evdev/input_device_factory_evdev.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698