Index: content/browser/renderer_host/input/touch_emulator_unittest.cc |
diff --git a/content/browser/renderer_host/input/touch_emulator_unittest.cc b/content/browser/renderer_host/input/touch_emulator_unittest.cc |
index 440e39afffa32c20968beb241052da9e8f9e07fa..4b8bd1d5d6e4b9bf6f7bff1267288d9c8364e6b4 100644 |
--- a/content/browser/renderer_host/input/touch_emulator_unittest.cc |
+++ b/content/browser/renderer_host/input/touch_emulator_unittest.cc |
@@ -53,6 +53,7 @@ class TouchEmulatorTest : public testing::Test, |
#endif |
emulator_.reset(new TouchEmulator(this)); |
+ emulator_->SetDoubleTapSupportForPageEnabled(false); |
emulator_->Enable(ui::GestureProviderConfigType::GENERIC_MOBILE); |
} |
@@ -283,6 +284,20 @@ TEST_F(TouchEmulatorTest, Touch) { |
ExpectedEvents()); |
} |
+TEST_F(TouchEmulatorTest, DoubleTapSupport) { |
+ emulator()->SetDoubleTapSupportForPageEnabled(true); |
+ MouseMove(100, 200); |
+ EXPECT_EQ("", ExpectedEvents()); |
+ MouseDown(100, 200); |
+ EXPECT_EQ("TouchStart GestureTapDown", ExpectedEvents()); |
+ MouseUp(100, 200); |
+ EXPECT_EQ("TouchEnd GestureTapUnconfirmed", ExpectedEvents()); |
+ MouseDown(100, 200); |
+ EXPECT_EQ("TouchStart GestureTapCancel GestureTapDown", ExpectedEvents()); |
+ MouseUp(100, 200); |
+ EXPECT_EQ("TouchEnd GestureTapCancel GestureDoubleTap", ExpectedEvents()); |
+} |
+ |
TEST_F(TouchEmulatorTest, MultipleTouches) { |
MouseMove(100, 200); |
EXPECT_EQ("", ExpectedEvents()); |