OLD | NEW |
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 <linux/input.h> | 5 #include <linux/input.h> |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/memory/scoped_vector.h" | 9 #include "base/memory/scoped_vector.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 public: | 24 public: |
25 MockEventConverterEvdevImpl(int fd, | 25 MockEventConverterEvdevImpl(int fd, |
26 EventModifiersEvdev* modifiers, | 26 EventModifiersEvdev* modifiers, |
27 MouseButtonMapEvdev* button_map, | 27 MouseButtonMapEvdev* button_map, |
28 CursorDelegateEvdev* cursor, | 28 CursorDelegateEvdev* cursor, |
29 KeyboardEvdev* keyboard, | 29 KeyboardEvdev* keyboard, |
30 const EventDispatchCallback& callback) | 30 const EventDispatchCallback& callback) |
31 : EventConverterEvdevImpl(fd, | 31 : EventConverterEvdevImpl(fd, |
32 base::FilePath(kTestDevicePath), | 32 base::FilePath(kTestDevicePath), |
33 1, | 33 1, |
| 34 INPUT_DEVICE_UNKNOWN, |
34 modifiers, | 35 modifiers, |
35 button_map, | 36 button_map, |
36 cursor, | 37 cursor, |
37 keyboard, | 38 keyboard, |
38 callback) { | 39 callback) { |
39 Start(); | 40 Start(); |
40 } | 41 } |
41 ~MockEventConverterEvdevImpl() override {} | 42 ~MockEventConverterEvdevImpl() override {} |
42 | 43 |
43 private: | 44 private: |
(...skipping 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
463 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, | 464 {{0, 0}, EV_KEY, BTN_TOUCH, 1}, |
464 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 465 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
465 | 466 |
466 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, | 467 {{0, 0}, EV_KEY, BTN_TOUCH, 0}, |
467 {{0, 0}, EV_SYN, SYN_REPORT, 0}, | 468 {{0, 0}, EV_SYN, SYN_REPORT, 0}, |
468 }; | 469 }; |
469 | 470 |
470 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); | 471 dev->ProcessEvents(mock_kernel_queue, arraysize(mock_kernel_queue)); |
471 EXPECT_EQ(0u, size()); | 472 EXPECT_EQ(0u, size()); |
472 } | 473 } |
OLD | NEW |