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

Unified Diff: ui/touch_selection/touch_handle_unittest.cc

Issue 1294933006: Don't use the touch rect when targetting above the touch handles (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 4 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 | « ui/touch_selection/touch_handle.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/touch_selection/touch_handle_unittest.cc
diff --git a/ui/touch_selection/touch_handle_unittest.cc b/ui/touch_selection/touch_handle_unittest.cc
index 8e929815157bca518ed896be97dfd1dfac95e529..944db37e2f3f6f857f1fa9041ccecfdce320b4a5 100644
--- a/ui/touch_selection/touch_handle_unittest.cc
+++ b/ui/touch_selection/touch_handle_unittest.cc
@@ -458,6 +458,14 @@ TEST_F(TouchHandleTest, DragTargettingUsesTouchSize) {
event.SetTouchMajor(0);
EXPECT_TRUE(handle.WillHandleTouchEvent(event));
EXPECT_TRUE(IsDragging());
+
+ // Touches centered above the handle region should never register a hit, even
+ // if the touch region intersects the handle region.
+ event = MockMotionEvent(MockMotionEvent::ACTION_DOWN, event_time,
+ kDefaultDrawableSize / 2.f, -kTouchSize / 3.f);
+ event.SetTouchMajor(kTouchSize);
+ EXPECT_FALSE(handle.WillHandleTouchEvent(event));
+ EXPECT_FALSE(IsDragging());
}
TEST_F(TouchHandleTest, Tap) {
« no previous file with comments | « ui/touch_selection/touch_handle.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698