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

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

Issue 12087140: Suppress touchscreen tap immediately after a GestureFlingCancel (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 11 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/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 e3aca54260ea79b72057f90c3c818d2cc446fd94..c4d2f11babab1ddb209005b65e57a974eb4cebd8 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -12,9 +12,9 @@
#include "content/browser/renderer_host/gesture_event_filter.h"
#include "content/browser/renderer_host/overscroll_controller.h"
#include "content/browser/renderer_host/overscroll_controller_delegate.h"
-#include "content/browser/renderer_host/tap_suppression_controller.h"
#include "content/browser/renderer_host/test_render_view_host.h"
#include "content/browser/renderer_host/touch_event_queue.h"
+#include "content/browser/renderer_host/touchpad_tap_suppression_controller.h"
#include "content/common/view_messages.h"
#include "content/port/browser/render_widget_host_view_port.h"
#include "content/public/browser/notification_details.h"
@@ -119,11 +119,11 @@ class MockRenderWidgetHost : public RenderWidgetHostImpl {
using RenderWidgetHostImpl::overscroll_controller_;
enum TapSuppressionState {
- TSC_NOTHING = TapSuppressionController::NOTHING,
- TSC_GFC_IN_PROGRESS = TapSuppressionController::GFC_IN_PROGRESS,
- TSC_MD_STASHED = TapSuppressionController::MD_STASHED,
+ TSC_NOTHING = TouchpadTapSuppressionController::NOTHING,
+ TSC_GFC_IN_PROGRESS = TouchpadTapSuppressionController::GFC_IN_PROGRESS,
+ TSC_MD_STASHED = TouchpadTapSuppressionController::MD_STASHED,
TSC_LAST_CANCEL_STOPPED_FLING =
- TapSuppressionController::LAST_CANCEL_STOPPED_FLING,
+ TouchpadTapSuppressionController::LAST_CANCEL_STOPPED_FLING,
};
bool unresponsive_timer_fired() const {
@@ -164,7 +164,7 @@ class MockRenderWidgetHost : public RenderWidgetHostImpl {
TapSuppressionState TapSuppressionControllerState() {
return static_cast<TapSuppressionState>(
- gesture_event_filter_->tap_suppression_controller_->state_);
+ gesture_event_filter_->touchpad_tap_suppression_controller_->state_);
}
void SetupForOverscrollControllerTest() {
@@ -1587,8 +1587,8 @@ TEST_F(RenderWidgetHostTest, DebounceDropsDeferredEvents) {
}
#if defined(USE_AURA)
-// Test TapSuppressionController for when GestureFlingCancel Ack comes before
-// MouseDown and everything happens without any delays.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// before MouseDown and everything happens without any delays.
TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseFast) {
process_->sink().ClearMessages();
@@ -1648,8 +1648,8 @@ TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseFast) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes before
-// MouseDown, but there is a small delay between MouseDown and MouseUp.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// before MouseDown, but there is a small delay between MouseDown and MouseUp.
TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseInsufficientlyLateMouseUp) {
process_->sink().ClearMessages();
@@ -1724,8 +1724,8 @@ TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseInsufficientlyLateMouseUp) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes before
-// MouseDown, but there is a long delay between MouseDown and MouseUp.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// before MouseDown, but there is a long delay between MouseDown and MouseUp.
TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseSufficientlyLateMouseUp) {
process_->sink().ClearMessages();
@@ -1801,8 +1801,8 @@ TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseSufficientlyLateMouseUp) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes before
-// MouseDown, but there is a small delay between the Ack and MouseDown.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// before MouseDown, but there is a small delay between the Ack and MouseDown.
TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseInsufficientlyLateMouseDown) {
process_->sink().ClearMessages();
@@ -1878,8 +1878,8 @@ TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseInsufficientlyLateMouseDown) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes before
-// MouseDown, but there is a long delay between the Ack and MouseDown.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// before MouseDown, but there is a long delay between the Ack and MouseDown.
TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseSufficientlyLateMouseDown) {
process_->sink().ClearMessages();
@@ -1954,8 +1954,8 @@ TEST_F(RenderWidgetHostTest, GFCAckBeforeMouseSufficientlyLateMouseDown) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when unprocessed GestureFlingCancel Ack
-// comes after MouseDown and everything happens without any delay.
+// Test TouchpadTapSuppressionController for when unprocessed GestureFlingCancel
+// Ack comes after MouseDown and everything happens without any delay.
TEST_F(RenderWidgetHostTest, GFCAckUnprocessedAfterMouseFast) {
process_->sink().ClearMessages();
@@ -2018,8 +2018,8 @@ TEST_F(RenderWidgetHostTest, GFCAckUnprocessedAfterMouseFast) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when processed GestureFlingCancel Ack
-// comes after MouseDown and everything happens without any delay.
+// Test TouchpadTapSuppressionController for when processed GestureFlingCancel
+// Ack comes after MouseDown and everything happens without any delay.
TEST_F(RenderWidgetHostTest, GFCAckProcessedAfterMouseFast) {
process_->sink().ClearMessages();
@@ -2081,8 +2081,8 @@ TEST_F(RenderWidgetHostTest, GFCAckProcessedAfterMouseFast) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes after
-// MouseDown and there is a small delay between the Ack and MouseUp.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// after MouseDown and there is a small delay between the Ack and MouseUp.
TEST_F(RenderWidgetHostTest, GFCAckAfterMouseInsufficientlyLateMouseUp) {
process_->sink().ClearMessages();
@@ -2159,8 +2159,8 @@ TEST_F(RenderWidgetHostTest, GFCAckAfterMouseInsufficientlyLateMouseUp) {
EXPECT_FALSE(host_->FlingInProgress());
}
-// Test TapSuppressionController for when GestureFlingCancel Ack comes after
-// MouseDown and there is a long delay between the Ack and MouseUp.
+// Test TouchpadTapSuppressionController for when GestureFlingCancel Ack comes
+// after MouseDown and there is a long delay between the Ack and MouseUp.
TEST_F(RenderWidgetHostTest, GFCAckAfterMouseSufficientlyLateMouseUp) {
process_->sink().ClearMessages();

Powered by Google App Engine
This is Rietveld 408576698