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

Unified Diff: third_party/WebKit/Source/core/input/EventHandlerTest.cpp

Issue 2864833002: Tapping handle shouldn't select misspelled word (Closed)
Patch Set: Fixed naming Created 3 years, 7 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 | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/input/EventHandlerTest.cpp
diff --git a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
index 641ba710be21239cf25614faf122adb2c38c7ad7..8aa7af09f71ddc779810aeaa4cc9ee5b54b5f0f2 100644
--- a/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
+++ b/third_party/WebKit/Source/core/input/EventHandlerTest.cpp
@@ -462,6 +462,32 @@ TEST_F(EventHandlerTest, HandleNotShownOnMouseEvents) {
ASSERT_FALSE(Selection().IsHandleVisible());
}
+TEST_F(EventHandlerTest, MisspellingContextMenuEvent) {
+ if (GetDocument()
+ .GetFrame()
+ ->GetEditor()
+ .Behavior()
+ .ShouldSelectOnContextualMenuClick())
+ return;
+
+ SetHtmlInnerHTML("<textarea cols=50 rows=50>Mispellinggg</textarea>");
+
+ TapEventBuilder single_tap_event(IntPoint(10, 10), 1);
+ GetDocument().GetFrame()->GetEventHandler().HandleGestureEvent(
+ single_tap_event);
+
+ ASSERT_TRUE(
+ Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret());
+ ASSERT_TRUE(Selection().IsHandleVisible());
+
+ GetDocument().GetFrame()->GetEventHandler().ShowNonLocatedContextMenu(
+ nullptr, kMenuSourceTouchHandle);
+
+ ASSERT_TRUE(
+ Selection().ComputeVisibleSelectionInDOMTreeDeprecated().IsCaret());
+ ASSERT_TRUE(Selection().IsHandleVisible());
+}
+
TEST_F(EventHandlerTest, dragEndInNewDrag) {
SetHtmlInnerHTML(
"<style>.box { width: 100px; height: 100px; display: block; }</style>"
« no previous file with comments | « third_party/WebKit/Source/core/input/EventHandler.cpp ('k') | third_party/WebKit/Source/web/WebViewImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698