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

Unified Diff: ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc

Issue 193813003: ozone: evdev: Add libgestures bindings for touchpad & mouse support (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: moved 1 space by 1 character Created 6 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/ozone/evdev/touch_event_converter_evdev.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
diff --git a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
index 472e79eb0321a841f2a026b0cf324529b94ea1e1..70a211a8def6259262b45d16e6b4268f833f8d1b 100644
--- a/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
+++ b/ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc
@@ -53,7 +53,7 @@ class MockTouchEventConverterEvdev : public TouchEventConverterEvdev {
base::RunLoop().RunUntilIdle();
}
- void DispatchCallback(void* event) {
+ void DispatchCallback(Event* event) {
dispatched_events_.push_back(
new TouchEvent(*static_cast<TouchEvent*>(event)));
}
@@ -69,7 +69,12 @@ class MockTouchEventConverterEvdev : public TouchEventConverterEvdev {
MockTouchEventConverterEvdev::MockTouchEventConverterEvdev(int fd,
base::FilePath path)
- : TouchEventConverterEvdev(fd, path, EventDeviceInfo()) {
+ : TouchEventConverterEvdev(
+ fd,
+ path,
+ EventDeviceInfo(),
+ base::Bind(&MockTouchEventConverterEvdev::DispatchCallback,
+ base::Unretained(this))) {
pressure_min_ = 30;
pressure_max_ = 60;
@@ -122,9 +127,6 @@ class TouchEventConverterEvdevTest : public testing::Test {
loop_ = new base::MessageLoopForUI;
device_ = new ui::MockTouchEventConverterEvdev(
events_in_, base::FilePath(kTestDevicePath));
- device_->SetDispatchCallback(
- base::Bind(&ui::MockTouchEventConverterEvdev::DispatchCallback,
- base::Unretained(device_)));
}
virtual void TearDown() OVERRIDE {
« no previous file with comments | « ui/events/ozone/evdev/touch_event_converter_evdev.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698