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

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: Fixed review comments and line breaks. Created 6 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
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 55e393af019757c4431890b5b19436f88db97531..1be382b5872126862217d817fc68fc3095bcdfae 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
@@ -374,7 +374,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());
event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
@@ -394,7 +395,7 @@ TEST_F(TouchSelectionControllerTest, InsertionTapped) {
0,
0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
- EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
// Reset the insertion.
ClearInsertion();
@@ -407,7 +408,7 @@ TEST_F(TouchSelectionControllerTest, InsertionTapped) {
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
event = MockMotionEvent(MockMotionEvent::ACTION_CANCEL, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
- EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
}
TEST_F(TouchSelectionControllerTest, InsertionNotResetByRepeatedTapOrPress) {
@@ -426,7 +427,7 @@ TEST_F(TouchSelectionControllerTest, InsertionNotResetByRepeatedTapOrPress) {
controller().OnTapEvent();
MockMotionEvent event(MockMotionEvent::ACTION_DOWN, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
- EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
EXPECT_EQ(anchor_rect.bottom_left(), GetLastEventAnchor());
event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time, 0, 0);
@@ -444,7 +445,7 @@ TEST_F(TouchSelectionControllerTest, InsertionNotResetByRepeatedTapOrPress) {
controller().OnSelectionEmpty(true);
event = MockMotionEvent(MockMotionEvent::ACTION_DOWN, event_time, 0, 0);
EXPECT_TRUE(controller().WillHandleTouchEvent(event));
- EXPECT_EQ(INSERTION_MOVED, GetLastEventType());
+ EXPECT_EQ(INSERTION_DRAG_STARTED, GetLastEventType());
EXPECT_EQ(anchor_rect.bottom_left(), GetLastEventAnchor());
event = MockMotionEvent(MockMotionEvent::ACTION_UP, event_time, 0, 0);

Powered by Google App Engine
This is Rietveld 408576698