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

Side by Side Diff: ui/events/gesture_detection/gesture_provider_unittest.cc

Issue 502993004: Remove abstract Clone and Cancel methods from MotionEvent (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nasty bug fix Created 6 years, 1 month 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
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 "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
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
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/gesture_event_data_packet_unittest.cc ('k') | ui/events/gesture_detection/motion_event.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698