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

Unified Diff: content/browser/renderer_host/render_widget_host_unittest.cc

Issue 11414208: Don't delay tap down(show_press) gesture events on gesture_event_filter for Android (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed build errors Created 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/browser/renderer_host/gesture_event_filter.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_unittest.cc
diff --git a/content/browser/renderer_host/render_widget_host_unittest.cc b/content/browser/renderer_host/render_widget_host_unittest.cc
index 2cd550367e4a58a11500a041e6ece9bd6d18eff3..83677d21832a5ae155b33c2cb30d4689ddd52968 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -141,6 +141,10 @@ class MockRenderWidgetHost : public RenderWidgetHostImpl {
return gesture_event_filter_->coalesced_gesture_events_.at(i);
}
+ bool shouldDeferTapDownEvents() {
+ return gesture_event_filter_->maximum_tap_gap_time_ms_ != 0;
+ }
+
bool ScrollingInProgress() {
return gesture_event_filter_->scrolling_in_progress_;
}
@@ -1443,8 +1447,11 @@ TEST_F(RenderWidgetHostTest, DebounceDefersFollowingGestureEvents) {
// The deferred events are correctly queued in coalescing queue.
EXPECT_EQ(1U, process_->sink().message_count());
- // NOTE: The TapDown is still deferred hence not queued.
- EXPECT_EQ(4U, host_->GestureEventLastQueueEventSize());
+ if (host_->shouldDeferTapDownEvents())
+ // NOTE: The TapDown is still deferred hence not queued.
+ EXPECT_EQ(4U, host_->GestureEventLastQueueEventSize());
+ else
+ EXPECT_EQ(5U, host_->GestureEventLastQueueEventSize());
EXPECT_EQ(0U, host_->GestureEventDebouncingQueueSize());
EXPECT_FALSE(host_->ScrollingInProgress());
« no previous file with comments | « content/browser/renderer_host/gesture_event_filter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698