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

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

Issue 1989623002: Suppressed MEs for gestures from cancelled PEs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 6 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 "ui/events/gesture_detection/touch_disposition_gesture_filter.h" 5 #include "ui/events/gesture_detection/touch_disposition_gesture_filter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <memory> 10 #include <memory>
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 GestureEventData CreateGesture(EventType type, 264 GestureEventData CreateGesture(EventType type,
265 float x, 265 float x,
266 float y, 266 float y,
267 float diameter) { 267 float diameter) {
268 GestureEventDetails details(type); 268 GestureEventDetails details(type);
269 details.set_device_type(GestureDeviceType::DEVICE_TOUCHSCREEN); 269 details.set_device_type(GestureDeviceType::DEVICE_TOUCHSCREEN);
270 return GestureEventData( 270 return GestureEventData(
271 details, 0, MotionEvent::TOOL_TYPE_FINGER, base::TimeTicks(), x, y, 0, 271 details, 0, MotionEvent::TOOL_TYPE_FINGER, base::TimeTicks(), x, y, 0,
272 0, 1, 272 0, 1,
273 gfx::RectF(x - diameter / 2, y - diameter / 2, diameter, diameter), 273 gfx::RectF(x - diameter / 2, y - diameter / 2, diameter, diameter),
274 kDefaultEventFlags); 274 kDefaultEventFlags, 0U);
275 } 275 }
276 276
277 private: 277 private:
278 std::unique_ptr<TouchDispositionGestureFilter> queue_; 278 std::unique_ptr<TouchDispositionGestureFilter> queue_;
279 bool cancel_after_next_gesture_; 279 bool cancel_after_next_gesture_;
280 MockMotionEvent touch_event_; 280 MockMotionEvent touch_event_;
281 GestureEventDataPacket pending_gesture_packet_; 281 GestureEventDataPacket pending_gesture_packet_;
282 size_t sent_gesture_count_; 282 size_t sent_gesture_count_;
283 GestureList sent_gestures_; 283 GestureList sent_gestures_;
284 gfx::Vector2dF raw_offset_; 284 gfx::Vector2dF raw_offset_;
(...skipping 969 matching lines...) Expand 10 before | Expand all | Expand 10 after
1254 ET_GESTURE_SCROLL_UPDATE), 1254 ET_GESTURE_SCROLL_UPDATE),
1255 GetAndResetSentGestures())); 1255 GetAndResetSentGestures()));
1256 1256
1257 // The touch release still requires an ack. 1257 // The touch release still requires an ack.
1258 SendTouchNotConsumedAck(touch_release_event_id); 1258 SendTouchNotConsumedAck(touch_release_event_id);
1259 EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_END), 1259 EXPECT_TRUE(GesturesMatch(Gestures(ET_GESTURE_END),
1260 GetAndResetSentGestures())); 1260 GetAndResetSentGestures()));
1261 } 1261 }
1262 1262
1263 } // namespace ui 1263 } // namespace ui
OLDNEW
« no previous file with comments | « ui/events/gesture_detection/touch_disposition_gesture_filter.cc ('k') | ui/events/gestures/gesture_provider_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698