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

Unified Diff: content/browser/renderer_host/input/touch_action_filter_unittest.cc

Issue 197273003: Add support for touch-action: manipulation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Move validation to IPC layer Created 6 years, 9 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/input/touch_action_filter.cc ('k') | content/common/input/touch_action.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/input/touch_action_filter_unittest.cc
diff --git a/content/browser/renderer_host/input/touch_action_filter_unittest.cc b/content/browser/renderer_host/input/touch_action_filter_unittest.cc
index 7d362a40a0ff4431d255ad6d0b16f8624efb4b54..38221245f6b0bbed9a4c952d66d5766242be0147 100644
--- a/content/browser/renderer_host/input/touch_action_filter_unittest.cc
+++ b/content/browser/renderer_host/input/touch_action_filter_unittest.cc
@@ -415,6 +415,15 @@ TEST(TouchActionFilterTest, Pinch) {
EXPECT_TRUE(filter.FilterGestureEvent(&pinch_end));
EXPECT_FALSE(filter.FilterGestureEvent(&scroll_end));
+ // Pinch is allowed with touch-action: manipulation.
+ filter.ResetTouchAction();
+ filter.OnSetTouchAction(TOUCH_ACTION_MANIPULATION);
+ EXPECT_FALSE(filter.FilterGestureEvent(&scroll_begin));
+ EXPECT_FALSE(filter.FilterGestureEvent(&pinch_begin));
+ EXPECT_FALSE(filter.FilterGestureEvent(&pinch_update));
+ EXPECT_FALSE(filter.FilterGestureEvent(&pinch_end));
+ EXPECT_FALSE(filter.FilterGestureEvent(&scroll_end));
+
// Pinch state is automatically reset at the end of a scroll.
filter.ResetTouchAction();
EXPECT_FALSE(filter.FilterGestureEvent(&scroll_begin));
@@ -504,7 +513,7 @@ TEST(TouchActionFilterTest, DoubleTap) {
// Double tap is disabled with any touch action other than auto.
filter.ResetTouchAction();
- filter.OnSetTouchAction(TOUCH_ACTION_NONE);
+ filter.OnSetTouchAction(TOUCH_ACTION_MANIPULATION);
EXPECT_FALSE(filter.FilterGestureEvent(&tap_down));
EXPECT_FALSE(filter.FilterGestureEvent(&unconfirmed_tap));
EXPECT_EQ(WebInputEvent::GestureTap, unconfirmed_tap.type);
« no previous file with comments | « content/browser/renderer_host/input/touch_action_filter.cc ('k') | content/common/input/touch_action.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698