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

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

Issue 312293002: Paste popup is positioning properly during content scroll. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unittests for the newly added event. Created 6 years, 5 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/input/touch_selection_controller_unittest.cc
diff --git a/content/browser/renderer_host/input/touch_selection_controller_unittest.cc b/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
index dee5c98764c3c0130f07a42760ebc3d945e7d1db..ed53cd402cec7cfba5263993d29df183e1ba9dff 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
@@ -320,6 +320,7 @@ TEST_F(TouchSelectionControllerTest, InsertionDragged) {
// The touch sequence should not be handled if insertion is not active.
MockMotionEvent event(MockMotionEvent::ACTION_DOWN, event_time, 0, 0);
EXPECT_FALSE(controller().WillHandleTouchEvent(event));
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
float line_height = 10.f;
gfx::RectF start_rect(10, 0, 0, line_height);
@@ -375,6 +376,8 @@ TEST_F(TouchSelectionControllerTest, InsertionTapped) {
MockMotionEvent event(MockMotionEvent::ACTION_DOWN, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
+ //TODO(AKV) this test case has to be modified once crbug.com/394093 is fixed
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
jdduke (slow) 2014/08/01 15:10:51 Thanks for adding this. One nit, add a colon ":"
AKVT 2014/08/01 15:23:25 Done.
event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));

Powered by Google App Engine
This is Rietveld 408576698