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

Side by Side Diff: ui/events/ozone/evdev/touch_event_converter_evdev_unittest.cc

Issue 868043003: [PATCH 8/11] ozone: evdev: Plumb device changes to EventFactoryEvdev (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase 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
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <errno.h> 5 #include <errno.h>
6 #include <fcntl.h> 6 #include <fcntl.h>
7 #include <linux/input.h> 7 #include <linux/input.h>
8 #include <unistd.h> 8 #include <unistd.h>
9 9
10 #include <vector> 10 #include <vector>
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 void DispatchKeyEvent(const KeyEventParams& params) override {} 75 void DispatchKeyEvent(const KeyEventParams& params) override {}
76 void DispatchMouseMoveEvent(const MouseMoveEventParams& params) override {} 76 void DispatchMouseMoveEvent(const MouseMoveEventParams& params) override {}
77 void DispatchMouseButtonEvent(const MouseButtonEventParams& params) override { 77 void DispatchMouseButtonEvent(const MouseButtonEventParams& params) override {
78 } 78 }
79 void DispatchMouseWheelEvent(const MouseWheelEventParams& params) override {} 79 void DispatchMouseWheelEvent(const MouseWheelEventParams& params) override {}
80 void DispatchScrollEvent(const ScrollEventParams& params) override {} 80 void DispatchScrollEvent(const ScrollEventParams& params) override {}
81 void DispatchTouchEvent(const TouchEventParams& params) override { 81 void DispatchTouchEvent(const TouchEventParams& params) override {
82 callback_.Run(params); 82 callback_.Run(params);
83 } 83 }
84 84
85 void DispatchKeyboardDevicesUpdated(
86 const std::vector<KeyboardDevice>& devices) override {}
87 void DispatchTouchscreenDevicesUpdated(
88 const std::vector<TouchscreenDevice>& devices) override {}
89 void DispatchMouseDevicesUpdated(
90 const std::vector<InputDevice>& devices) override {}
91 void DispatchTouchpadDevicesUpdated(
92 const std::vector<InputDevice>& devices) override {}
93
85 private: 94 private:
86 base::Callback<void(const TouchEventParams& params)> callback_; 95 base::Callback<void(const TouchEventParams& params)> callback_;
87 }; 96 };
88 97
89 MockTouchEventConverterEvdev::MockTouchEventConverterEvdev( 98 MockTouchEventConverterEvdev::MockTouchEventConverterEvdev(
90 int fd, 99 int fd,
91 base::FilePath path, 100 base::FilePath path,
92 DeviceEventDispatcherEvdev* dispatcher) 101 DeviceEventDispatcherEvdev* dispatcher)
93 : TouchEventConverterEvdev(fd, path, 1, INPUT_DEVICE_UNKNOWN, dispatcher) { 102 : TouchEventConverterEvdev(fd, path, 1, INPUT_DEVICE_UNKNOWN, dispatcher) {
94 pressure_min_ = 30; 103 pressure_min_ = 30;
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 777}, 564 {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 777},
556 {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 666}, 565 {{0, 0}, EV_ABS, ABS_MT_POSITION_Y, 666},
557 {{0, 0}, EV_SYN, SYN_REPORT, 0}, 566 {{0, 0}, EV_SYN, SYN_REPORT, 0},
558 }; 567 };
559 568
560 // Check that one 1 event is generated 569 // Check that one 1 event is generated
561 dev->ConfigureReadMock(mock_kernel_queue, arraysize(mock_kernel_queue), 0); 570 dev->ConfigureReadMock(mock_kernel_queue, arraysize(mock_kernel_queue), 0);
562 dev->ReadNow(); 571 dev->ReadNow();
563 EXPECT_EQ(1u, size()); 572 EXPECT_EQ(1u, size());
564 } 573 }
OLDNEW
« no previous file with comments | « ui/events/ozone/evdev/libgestures_glue/event_reader_libevdev_cros.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698