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

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

Issue 486763004: Fixed the issue of insertion handle not clearing on single tap on empty field. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Added unit testcase and fixed nits. 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
« no previous file with comments | « content/browser/renderer_host/input/touch_selection_controller.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 f14860c4891cb67ddc5996eac90ce5ba218e83b4..d5aabbb0a565a283bd030efc82afffd8e56a89fb 100644
--- a/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
+++ b/content/browser/renderer_host/input/touch_selection_controller_unittest.cc
@@ -256,6 +256,10 @@ TEST_F(TouchSelectionControllerTest, InsertionStaysHiddenIfEmptyRegionTapped) {
ChangeInsertion(insertion_rect, visible);
EXPECT_EQ(INSERTION_SHOWN, GetLastEventType());
EXPECT_EQ(insertion_rect.bottom_left(), GetLastEventAnchor());
+
+ // Single Tap on an empty edit field should clear insertion handle.
+ controller().OnTapEvent();
+ EXPECT_EQ(INSERTION_CLEARED, GetLastEventType());
}
TEST_F(TouchSelectionControllerTest, InsertionAppearsAfterTapFollowingTyping) {
« no previous file with comments | « content/browser/renderer_host/input/touch_selection_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698