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

Side by Side Diff: ui/events/devices/x11/device_data_manager_x11_unittest.cc

Issue 889403003: Make PointerDeviceObserver work under Ozone (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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/events/devices/x11/device_data_manager_x11.h" 5 #include "ui/events/devices/x11/device_data_manager_x11.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 // Generically-named #defines from Xlib that conflict with symbols in GTest. 9 // Generically-named #defines from Xlib that conflict with symbols in GTest.
10 #undef Bool 10 #undef Bool
(...skipping 21 matching lines...) Expand all
32 ~TestInputDeviceObserver() override { 32 ~TestInputDeviceObserver() override {
33 if (manager_) 33 if (manager_)
34 manager_->RemoveObserver(this); 34 manager_->RemoveObserver(this);
35 } 35 }
36 36
37 // InputDeviceEventObserver implementation. 37 // InputDeviceEventObserver implementation.
38 void OnTouchscreenDeviceConfigurationChanged() override {} 38 void OnTouchscreenDeviceConfigurationChanged() override {}
39 void OnKeyboardDeviceConfigurationChanged() override { 39 void OnKeyboardDeviceConfigurationChanged() override {
40 change_notified_ = true; 40 change_notified_ = true;
41 } 41 }
42 void OnMouseDeviceConfigurationChanged() override {}
43 void OnTouchpadDeviceConfigurationChanged() override {}
42 44
43 int change_notified() const { return change_notified_; } 45 int change_notified() const { return change_notified_; }
44 void Reset() { change_notified_ = false; } 46 void Reset() { change_notified_ = false; }
45 47
46 private: 48 private:
47 DeviceDataManager* manager_; 49 DeviceDataManager* manager_;
48 bool change_notified_; 50 bool change_notified_;
49 51
50 DISALLOW_COPY_AND_ASSIGN(TestInputDeviceObserver); 52 DISALLOW_COPY_AND_ASSIGN(TestInputDeviceObserver);
51 }; 53 };
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Replug in the first device. Should be notified of the new device. 175 // Replug in the first device. Should be notified of the new device.
174 SetKeyboardDevices(all_keyboards); 176 SetKeyboardDevices(all_keyboards);
175 EXPECT_TRUE(observer.change_notified()); 177 EXPECT_TRUE(observer.change_notified());
176 devices = manager->keyboard_devices(); 178 devices = manager->keyboard_devices();
177 // Both devices now present. 179 // Both devices now present.
178 EXPECT_EQ(2u, devices.size()); 180 EXPECT_EQ(2u, devices.size());
179 } 181 }
180 182
181 } // namespace test 183 } // namespace test
182 } // namespace ui 184 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698