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>" |