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

Unified Diff: content/renderer/input/main_thread_event_queue_unittest.cc

Issue 2710663003: Merging of touch event ack ids was inconsistent. (Closed)
Patch Set: Whoops a bit to aggressive; still need the clear Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/input/main_thread_event_queue_unittest.cc
diff --git a/content/renderer/input/main_thread_event_queue_unittest.cc b/content/renderer/input/main_thread_event_queue_unittest.cc
index cda96df4c6a7ffad7a35670f7622ea7f78598ea6..2cdd7c4215f8cb7cfab0f84a58611e75036c9d62 100644
--- a/content/renderer/input/main_thread_event_queue_unittest.cc
+++ b/content/renderer/input/main_thread_event_queue_unittest.cc
@@ -343,8 +343,13 @@ TEST_P(MainThreadEventQueueTest, BlockingTouch) {
EXPECT_EQ(0u, event_queue().size());
EXPECT_EQ(2u, additional_acked_events_.size());
- EXPECT_EQ(kEvents[2].uniqueTouchEventId, additional_acked_events_.at(0));
- EXPECT_EQ(kEvents[3].uniqueTouchEventId, additional_acked_events_.at(1));
+ EXPECT_EQ(kEvents[1].uniqueTouchEventId, additional_acked_events_.at(0));
+ EXPECT_EQ(kEvents[2].uniqueTouchEventId, additional_acked_events_.at(1));
+
+ const WebTouchEvent* last_touch_event =
+ static_cast<const WebTouchEvent*>(handled_events_.at(1).eventPointer());
+ EXPECT_EQ(kEvents[3].uniqueTouchEventId,
+ last_touch_event->uniqueTouchEventId);
HandleEvent(kEvents[1], INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING);
HandleEvent(kEvents[2], INPUT_EVENT_ACK_STATE_SET_NON_BLOCKING);
@@ -532,14 +537,14 @@ TEST_P(MainThreadEventQueueTest, RafAlignedTouchInputCoalescedMoves) {
EXPECT_FALSE(main_task_runner_->HasPendingTask());
EXPECT_EQ(0u, event_queue().size());
- // Send a continuous input event (ack required) and then
- // a discrete event. The events should coalesce together
+ // Send a discrete input event and then a continuous
+ // (ack required) event. The events should coalesce together
// and a post task should be on the queue at the end.
- HandleEvent(kEvents[0], INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
+ HandleEvent(kEvents[1], INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
EXPECT_EQ(1u, event_queue().size());
EXPECT_FALSE(main_task_runner_->HasPendingTask());
EXPECT_TRUE(needs_main_frame_);
- HandleEvent(kEvents[1], INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
+ HandleEvent(kEvents[0], INPUT_EVENT_ACK_STATE_NOT_CONSUMED);
EXPECT_EQ(1u, event_queue().size());
EXPECT_FALSE(main_task_runner_->HasPendingTask());
EXPECT_TRUE(needs_main_frame_);

Powered by Google App Engine
This is Rietveld 408576698