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

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

Issue 280563002: [Ozone] Fix ozone build past refactors (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 6 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/content_tests.gypi ('k') | ui/ui_unittests.gyp » ('j') | 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 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void ReadNow() { 51 void ReadNow() {
52 OnFileCanReadWithoutBlocking(read_pipe_); 52 OnFileCanReadWithoutBlocking(read_pipe_);
53 base::RunLoop().RunUntilIdle(); 53 base::RunLoop().RunUntilIdle();
54 } 54 }
55 55
56 void DispatchCallback(Event* event) { 56 void DispatchCallback(Event* event) {
57 dispatched_events_.push_back( 57 dispatched_events_.push_back(
58 new TouchEvent(*static_cast<TouchEvent*>(event))); 58 new TouchEvent(*static_cast<TouchEvent*>(event)));
59 } 59 }
60 60
61 bool Reinitialize() OVERRIDE { return true; } 61 virtual bool Reinitialize() OVERRIDE { return true; }
62 62
63 private: 63 private:
64 int read_pipe_; 64 int read_pipe_;
65 int write_pipe_; 65 int write_pipe_;
66 66
67 ScopedVector<TouchEvent> dispatched_events_; 67 ScopedVector<TouchEvent> dispatched_events_;
68 68
69 DISALLOW_COPY_AND_ASSIGN(MockTouchEventConverterEvdev); 69 DISALLOW_COPY_AND_ASSIGN(MockTouchEventConverterEvdev);
70 }; 70 };
71 71
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after
472 472
473 struct input_event mock_kernel_queue_move1[] = { 473 struct input_event mock_kernel_queue_move1[] = {
474 {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 40}, {{0, 0}, EV_SYN, SYN_REPORT, 0} 474 {{0, 0}, EV_ABS, ABS_MT_POSITION_X, 40}, {{0, 0}, EV_SYN, SYN_REPORT, 0}
475 }; 475 };
476 476
477 // Verify that it re-syncs after a SYN_REPORT. 477 // Verify that it re-syncs after a SYN_REPORT.
478 dev->ConfigureReadMock(mock_kernel_queue_move1, 2, 0); 478 dev->ConfigureReadMock(mock_kernel_queue_move1, 2, 0);
479 dev->ReadNow(); 479 dev->ReadNow();
480 EXPECT_EQ(2u, dev->size()); 480 EXPECT_EQ(2u, dev->size());
481 } 481 }
OLDNEW
« no previous file with comments | « content/content_tests.gypi ('k') | ui/ui_unittests.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698