| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/logging.h" | 6 #include "base/logging.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/time/time.h" | 9 #include "base/time/time.h" |
| 10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/events/event_constants.h" | 11 #include "ui/events/event_constants.h" |
| 12 #include "ui/events/gesture_detection/gesture_event_data.h" | 12 #include "ui/events/gesture_detection/gesture_event_data.h" |
| 13 #include "ui/events/gesture_detection/gesture_provider.h" | 13 #include "ui/events/gesture_detection/gesture_provider.h" |
| 14 #include "ui/events/gesture_detection/motion_event.h" | 14 #include "ui/events/gesture_detection/motion_event.h" |
| 15 #include "ui/events/test/mock_motion_event.h" | 15 #include "ui/events/test/motion_event_test_utils.h" |
| 16 #include "ui/gfx/geometry/point_f.h" | 16 #include "ui/gfx/geometry/point_f.h" |
| 17 | 17 |
| 18 using base::TimeDelta; | 18 using base::TimeDelta; |
| 19 using base::TimeTicks; | 19 using base::TimeTicks; |
| 20 using ui::test::MockMotionEvent; | 20 using ui::test::MockMotionEvent; |
| 21 | 21 |
| 22 namespace ui { | 22 namespace ui { |
| 23 namespace { | 23 namespace { |
| 24 | 24 |
| 25 const float kFakeCoordX = 42.f; | 25 const float kFakeCoordX = 42.f; |
| (...skipping 2467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2493 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event)); | 2493 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event)); |
| 2494 EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType()); | 2494 EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType()); |
| 2495 | 2495 |
| 2496 EXPECT_EQ(1, GetMostRecentGestureEvent().details.tap_count()); | 2496 EXPECT_EQ(1, GetMostRecentGestureEvent().details.tap_count()); |
| 2497 EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points()); | 2497 EXPECT_EQ(1, GetMostRecentGestureEvent().details.touch_points()); |
| 2498 EXPECT_EQ(gfx::RectF(0, 0, 20, 20), | 2498 EXPECT_EQ(gfx::RectF(0, 0, 20, 20), |
| 2499 GetMostRecentGestureEvent().details.bounding_box()); | 2499 GetMostRecentGestureEvent().details.bounding_box()); |
| 2500 } | 2500 } |
| 2501 | 2501 |
| 2502 } // namespace ui | 2502 } // namespace ui |
| OLD | NEW |