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

Side by Side Diff: ui/events/gesture_detection/gesture_event_data_packet_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, 2 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
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 "testing/gtest/include/gtest/gtest.h" 6 #include "testing/gtest/include/gtest/gtest.h"
7 #include "ui/events/gesture_detection/gesture_event_data_packet.h" 7 #include "ui/events/gesture_detection/gesture_event_data_packet.h"
8 #include "ui/events/test/mock_motion_event.h" 8 #include "ui/events/test/motion_event_test_utils.h"
9 9
10 using ui::test::MockMotionEvent; 10 using ui::test::MockMotionEvent;
11 11
12 namespace ui { 12 namespace ui {
13 namespace { 13 namespace {
14 14
15 const float kTouchX = 13.7f; 15 const float kTouchX = 13.7f;
16 const float kTouchY = 14.2f; 16 const float kTouchY = 14.2f;
17 17
18 GestureEventData CreateGesture(EventType type) { 18 GestureEventData CreateGesture(EventType type) {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 125
126 GestureEventData gesture = CreateGesture(ET_GESTURE_TAP); 126 GestureEventData gesture = CreateGesture(ET_GESTURE_TAP);
127 packet = GestureEventDataPacket::FromTouchTimeout(gesture); 127 packet = GestureEventDataPacket::FromTouchTimeout(gesture);
128 EXPECT_EQ(GestureEventDataPacket::TOUCH_TIMEOUT, packet.gesture_source()); 128 EXPECT_EQ(GestureEventDataPacket::TOUCH_TIMEOUT, packet.gesture_source());
129 EXPECT_EQ(1U, packet.gesture_count()); 129 EXPECT_EQ(1U, packet.gesture_count());
130 EXPECT_EQ(base::TimeTicks(), packet.timestamp()); 130 EXPECT_EQ(base::TimeTicks(), packet.timestamp());
131 EXPECT_EQ(gfx::PointF(gesture.x, gesture.y), packet.touch_location()); 131 EXPECT_EQ(gfx::PointF(gesture.x, gesture.y), packet.touch_location());
132 } 132 }
133 133
134 } // namespace ui 134 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/bitset_32.h ('k') | ui/events/gesture_detection/gesture_provider_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698