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

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

Issue 2561963002: base: Remove the string logging from CHECK(). (Closed)
Patch Set: checkstring: rebase Created 4 years 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 "ui/events/gesture_detection/gesture_provider.h" 5 #include "ui/events/gesture_detection/gesture_provider.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 10
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 case 3: 112 case 3:
113 return MockMotionEvent(action, 113 return MockMotionEvent(action,
114 event_time, 114 event_time,
115 positions[0].x(), 115 positions[0].x(),
116 positions[0].y(), 116 positions[0].y(),
117 positions[1].x(), 117 positions[1].x(),
118 positions[1].y(), 118 positions[1].y(),
119 positions[2].x(), 119 positions[2].x(),
120 positions[2].y()); 120 positions[2].y());
121 default: 121 default:
122 CHECK(false) << "MockMotionEvent only supports 1-3 pointers"; 122 // MockMotionEvent only supports 1-3 pointers
123 CHECK(false);
123 return MockMotionEvent(); 124 return MockMotionEvent();
124 } 125 }
125 } 126 }
126 127
127 static MockMotionEvent ObtainMotionEvent(base::TimeTicks event_time, 128 static MockMotionEvent ObtainMotionEvent(base::TimeTicks event_time,
128 MotionEvent::Action action) { 129 MotionEvent::Action action) {
129 return ObtainMotionEvent(event_time, action, kFakeCoordX, kFakeCoordY); 130 return ObtainMotionEvent(event_time, action, kFakeCoordX, kFakeCoordY);
130 } 131 }
131 132
132 // Test 133 // Test
(...skipping 2692 matching lines...) Expand 10 before | Expand all | Expand 10 after
2825 event = ObtainMotionEvent(event_time, MotionEvent::ACTION_DOWN, kFakeCoordX, 2826 event = ObtainMotionEvent(event_time, MotionEvent::ACTION_DOWN, kFakeCoordX,
2826 kFakeCoordY + GetTouchSlop() / 2); 2827 kFakeCoordY + GetTouchSlop() / 2);
2827 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event)); 2828 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
2828 event = ObtainMotionEvent(event_time, MotionEvent::ACTION_UP); 2829 event = ObtainMotionEvent(event_time, MotionEvent::ACTION_UP);
2829 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event)); 2830 EXPECT_TRUE(gesture_provider_->OnTouchEvent(event));
2830 EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType()); 2831 EXPECT_EQ(ET_GESTURE_TAP, GetMostRecentGestureEventType());
2831 EXPECT_EQ(1, GetMostRecentGestureEvent().details.tap_count()); 2832 EXPECT_EQ(1, GetMostRecentGestureEvent().details.tap_count());
2832 } 2833 }
2833 2834
2834 } // namespace ui 2835 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698