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

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

Issue 821223002: Pass gesture detector config type when enabling touch emulator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@touch-emulator-enabled
Patch Set: Fixed cursor reset, rebased Created 5 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
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.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 4e354099bf9ffbc5b12b9b11234d3993e3c714cf..12dc3757196f5357931e0e56fe94824b0e040f95 100644
--- a/content/browser/renderer_host/render_widget_host_unittest.cc
+++ b/content/browser/renderer_host/render_widget_host_unittest.cc
@@ -1034,7 +1034,8 @@ TEST_F(RenderWidgetHostTest, TouchEmulator) {
simulated_event_time_delta_seconds_ = 0.1;
// Immediately ack all touches instead of sending them to the renderer.
host_->OnMessageReceived(ViewHostMsg_HasTouchEventHandlers(0, false));
- host_->SetTouchEventEmulationEnabled(true);
+ host_->SetTouchEventEmulationEnabled(
+ true, ui::GestureProviderConfigType::GENERIC_MOBILE);
process_->sink().ClearMessages();
view_->set_bounds(gfx::Rect(0, 0, 400, 200));
view_->Show();
@@ -1133,7 +1134,8 @@ TEST_F(RenderWidgetHostTest, TouchEmulator) {
EXPECT_EQ(0U, process_->sink().message_count());
// Turn off emulation during a pinch.
- host_->SetTouchEventEmulationEnabled(false);
+ host_->SetTouchEventEmulationEnabled(
+ false, ui::GestureProviderConfigType::GENERIC_MOBILE);
EXPECT_EQ(WebInputEvent::TouchCancel, host_->acked_touch_event_type());
EXPECT_EQ("GesturePinchEnd GestureScrollEnd",
GetInputMessageTypes(process_));
@@ -1148,7 +1150,8 @@ TEST_F(RenderWidgetHostTest, TouchEmulator) {
EXPECT_EQ(0U, process_->sink().message_count());
// Turn on emulation.
- host_->SetTouchEventEmulationEnabled(true);
+ host_->SetTouchEventEmulationEnabled(
+ true, ui::GestureProviderConfigType::GENERIC_MOBILE);
EXPECT_EQ(0U, process_->sink().message_count());
// Another touch.
@@ -1167,7 +1170,8 @@ TEST_F(RenderWidgetHostTest, TouchEmulator) {
INPUT_EVENT_ACK_STATE_CONSUMED);
// Turn off emulation during a scroll.
- host_->SetTouchEventEmulationEnabled(false);
+ host_->SetTouchEventEmulationEnabled(
+ false, ui::GestureProviderConfigType::GENERIC_MOBILE);
EXPECT_EQ(WebInputEvent::TouchCancel, host_->acked_touch_event_type());
EXPECT_EQ("GestureScrollEnd", GetInputMessageTypes(process_));
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698