diff options
author | kpschoedel <kpschoedel@chromium.org> | 2015-04-14 07:36:26 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-14 14:36:37 +0000 |
commit | a824971547acc92c86a302e442c385f94d63a3fb (patch) | |
tree | 72134e5073207a0c9a997890ef88ff6fbe1b6fa6 /ui/events/devices/x11/device_data_manager_x11_unittest.cc | |
parent | 1f3cf686b7e5ffcbf867b3f3775ba83b79fbf504 (diff) | |
download | chromium_src-a824971547acc92c86a302e442c385f94d63a3fb.zip chromium_src-a824971547acc92c86a302e442c385f94d63a3fb.tar.gz chromium_src-a824971547acc92c86a302e442c385f94d63a3fb.tar.bz2 |
Change device IDs from unsigned to signed.
Change ui::InputDevice::id and ash::DisplayInfo::touch_device_id_ from
'unsigned int' to 'int' in accordance with the coding style guide.
Review URL: https://codereview.chromium.org/1071193002
Cr-Commit-Position: refs/heads/master@{#325042}
Diffstat (limited to 'ui/events/devices/x11/device_data_manager_x11_unittest.cc')
-rw-r--r-- | ui/events/devices/x11/device_data_manager_x11_unittest.cc | 30 |
1 files changed, 15 insertions, 15 deletions
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 444611f..3cce253f 100644 --- a/ui/events/devices/x11/device_data_manager_x11_unittest.cc +++ b/ui/events/devices/x11/device_data_manager_x11_unittest.cc @@ -78,9 +78,9 @@ TEST_F(DeviceDataManagerX11Test, NotifyOnDisable) { TestInputDeviceObserver observer(manager); std::vector<ui::KeyboardDevice> keyboards; keyboards.push_back( - ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); keyboards.push_back( - ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(2, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); SetKeyboardDevices(keyboards); EXPECT_TRUE(observer.change_notified()); std::vector<KeyboardDevice> devices = manager->keyboard_devices(); @@ -88,16 +88,16 @@ TEST_F(DeviceDataManagerX11Test, NotifyOnDisable) { observer.Reset(); // Disable the device, should be notified that the device list contains one // less device. - manager->DisableDevice(2u); + manager->DisableDevice(2); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(1u, devices.size()); KeyboardDevice device = devices.front(); - EXPECT_EQ(1u, device.id); + EXPECT_EQ(1, device.id); observer.Reset(); // Reenable the device, should be notified that the device list contains one // more device. - manager->EnableDevice(2u); + manager->EnableDevice(2); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(keyboards.size(), devices.size()); @@ -109,9 +109,9 @@ TEST_F(DeviceDataManagerX11Test, TestMultipleDisable) { TestInputDeviceObserver observer(manager); std::vector<ui::KeyboardDevice> keyboards; keyboards.push_back( - ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); keyboards.push_back( - ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(2, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); SetKeyboardDevices(keyboards); EXPECT_TRUE(observer.change_notified()); std::vector<KeyboardDevice> devices = manager->keyboard_devices(); @@ -119,25 +119,25 @@ TEST_F(DeviceDataManagerX11Test, TestMultipleDisable) { observer.Reset(); // Disable the device, should be notified that the device list contains one // less device. - manager->DisableDevice(1u); + manager->DisableDevice(1); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(1u, devices.size()); observer.Reset(); // Disable the second device, should be notified that the device list empty. - manager->DisableDevice(2u); + manager->DisableDevice(2); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(0u, devices.size()); observer.Reset(); // Enable the first device, should be notified that one device present. - manager->EnableDevice(1u); + manager->EnableDevice(1); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(1u, devices.size()); observer.Reset(); // Enable the second device, should be notified that both devices present. - manager->EnableDevice(2u); + manager->EnableDevice(2); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(2u, devices.size()); @@ -148,16 +148,16 @@ TEST_F(DeviceDataManagerX11Test, UnblockOnDeviceUnplugged) { TestInputDeviceObserver observer(manager); std::vector<ui::KeyboardDevice> all_keyboards; all_keyboards.push_back( - ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(1, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); all_keyboards.push_back( - ui::KeyboardDevice(2u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(2, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); SetKeyboardDevices(all_keyboards); EXPECT_TRUE(observer.change_notified()); std::vector<KeyboardDevice> devices = manager->keyboard_devices(); EXPECT_EQ(all_keyboards.size(), devices.size()); observer.Reset(); // Expect to be notified that the device is no longer available. - manager->DisableDevice(2u); + manager->DisableDevice(2); EXPECT_TRUE(observer.change_notified()); devices = manager->keyboard_devices(); EXPECT_EQ(1u, devices.size()); @@ -166,7 +166,7 @@ TEST_F(DeviceDataManagerX11Test, UnblockOnDeviceUnplugged) { // did not change. std::vector<ui::KeyboardDevice> subset_keyboards; subset_keyboards.push_back( - ui::KeyboardDevice(1u, ui::InputDeviceType::INPUT_DEVICE_INTERNAL)); + ui::KeyboardDevice(1, 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. |