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 <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> |
11 | 11 |
| 12 #include "base/bind.h" |
12 #include "base/memory/scoped_ptr.h" | 13 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 14 #include "base/memory/scoped_vector.h" |
14 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
15 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
16 #include "base/time/time.h" | 17 #include "base/time/time.h" |
17 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
18 #include "ui/events/event.h" | 19 #include "ui/events/event.h" |
19 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" | 20 #include "ui/events/ozone/evdev/touch_event_converter_evdev.h" |
20 #include "ui/events/platform/platform_event_dispatcher.h" | 21 #include "ui/events/platform/platform_event_dispatcher.h" |
21 #include "ui/events/platform/platform_event_source.h" | 22 #include "ui/events/platform/platform_event_source.h" |
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
518 EXPECT_EQ(0, ev0->touch_id()); | 519 EXPECT_EQ(0, ev0->touch_id()); |
519 EXPECT_EQ(999, ev0->x()); | 520 EXPECT_EQ(999, ev0->x()); |
520 EXPECT_EQ(888, ev0->y()); | 521 EXPECT_EQ(888, ev0->y()); |
521 EXPECT_FLOAT_EQ(0.8333333f, ev0->force()); | 522 EXPECT_FLOAT_EQ(0.8333333f, ev0->force()); |
522 | 523 |
523 EXPECT_EQ(1, ev1->touch_id()); | 524 EXPECT_EQ(1, ev1->touch_id()); |
524 EXPECT_EQ(777, ev1->x()); | 525 EXPECT_EQ(777, ev1->x()); |
525 EXPECT_EQ(666, ev1->y()); | 526 EXPECT_EQ(666, ev1->y()); |
526 EXPECT_FLOAT_EQ(0.4666666f, ev1->force()); | 527 EXPECT_FLOAT_EQ(0.4666666f, ev1->force()); |
527 } | 528 } |
OLD | NEW |