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

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

Issue 1071193002: Change device IDs from unsigned to signed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: check for negative IDs 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
« no previous file with comments | « ui/events/test/events_test_utils_x11.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.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 770445e27fce8dfdcfac8354ed3cf68de9da47f4..db9cb2e89049741f941abe0ecb99b5904d517600 100644
--- a/ui/events/x/events_x_unittest.cc
+++ b/ui/events/x/events_x_unittest.cc
@@ -230,7 +230,7 @@ TEST_F(EventsXTest, ClickCount) {
}
TEST_F(EventsXTest, TouchEventBasic) {
- std::vector<unsigned int> devices;
+ std::vector<int> devices;
devices.push_back(0);
ui::SetUpTouchDevicesForTest(devices);
std::vector<Valuator> valuators;
@@ -315,7 +315,7 @@ int GetTouchIdForTrackingId(uint32 tracking_id) {
}
TEST_F(EventsXTest, TouchEventNotRemovingFromNativeMapping) {
- std::vector<unsigned int> devices;
+ std::vector<int> devices;
devices.push_back(0);
ui::SetUpTouchDevicesForTest(devices);
std::vector<Valuator> valuators;
@@ -361,7 +361,7 @@ TEST_F(EventsXTest, TouchEventNotRemovingFromNativeMapping) {
// crash (crbug.com/467102). Copied events do not contain a proper
// base::NativeEvent and should not attempt to access it.
TEST_F(EventsXTest, CopiedTouchEventNotRemovingFromNativeMapping) {
- std::vector<unsigned int> devices;
+ std::vector<int> devices;
devices.push_back(0);
ui::SetUpTouchDevicesForTest(devices);
std::vector<Valuator> valuators;
@@ -539,9 +539,9 @@ TEST_F(EventsXTest, DisableKeyboard) {
DeviceDataManagerX11* device_data_manager =
static_cast<DeviceDataManagerX11*>(
DeviceDataManager::GetInstance());
- unsigned int blocked_device_id = 1;
- unsigned int other_device_id = 2;
- unsigned int master_device_id = 3;
+ int blocked_device_id = 1;
+ int other_device_id = 2;
+ int master_device_id = 3;
device_data_manager->DisableDevice(blocked_device_id);
scoped_ptr<std::set<KeyboardCode> > excepted_keys(new std::set<KeyboardCode>);
@@ -596,9 +596,9 @@ TEST_F(EventsXTest, DisableMouse) {
DeviceDataManagerX11* device_data_manager =
static_cast<DeviceDataManagerX11*>(
DeviceDataManager::GetInstance());
- unsigned int blocked_device_id = 1;
- unsigned int other_device_id = 2;
- std::vector<unsigned int> device_list;
+ int blocked_device_id = 1;
+ int other_device_id = 2;
+ std::vector<int> device_list;
device_list.push_back(blocked_device_id);
device_list.push_back(other_device_id);
TouchFactory::GetInstance()->SetPointerDeviceForTest(device_list);
« no previous file with comments | « ui/events/test/events_test_utils_x11.cc ('k') | ui/ozone/platform/egltest/ozone_platform_egltest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698