OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "base/memory/scoped_vector.h" | 13 #include "base/memory/scoped_vector.h" |
14 #include "base/message_loop.h" | 14 #include "base/message_loop/message_loop.h" |
15 #include "base/posix/eintr_wrapper.h" | 15 #include "base/posix/eintr_wrapper.h" |
16 #include "base/run_loop.h" | 16 #include "base/run_loop.h" |
17 #include "base/time/time.h" | 17 #include "base/time/time.h" |
18 #include "testing/gtest/include/gtest/gtest.h" | 18 #include "testing/gtest/include/gtest/gtest.h" |
19 #include "ui/base/events/event.h" | 19 #include "ui/base/events/event.h" |
20 #include "ui/base/ozone/touch_event_converter_ozone.h" | 20 #include "ui/base/ozone/touch_event_converter_ozone.h" |
21 | 21 |
22 | 22 |
23 namespace { | 23 namespace { |
24 | 24 |
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
388 ev1 = dev->event(8); | 388 ev1 = dev->event(8); |
389 | 389 |
390 EXPECT_EQ(ui::ET_TOUCH_RELEASED, ev1->type()); | 390 EXPECT_EQ(ui::ET_TOUCH_RELEASED, ev1->type()); |
391 EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp()); | 391 EXPECT_EQ(base::TimeDelta::FromMicroseconds(0), ev1->time_stamp()); |
392 EXPECT_EQ(38, ev1->x()); | 392 EXPECT_EQ(38, ev1->x()); |
393 EXPECT_EQ(102, ev1->y()); | 393 EXPECT_EQ(102, ev1->y()); |
394 EXPECT_EQ(1, ev1->touch_id()); | 394 EXPECT_EQ(1, ev1->touch_id()); |
395 EXPECT_FLOAT_EQ(.5f, ev1->force()); | 395 EXPECT_FLOAT_EQ(.5f, ev1->force()); |
396 EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle()); | 396 EXPECT_FLOAT_EQ(0.f, ev1->rotation_angle()); |
397 } | 397 } |
OLD | NEW |