| Index: third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| diff --git a/third_party/WebKit/Source/web/tests/WebViewTest.cpp b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| index df46990a39ed03fd49bd3f684c52f7646d77f078..22b2dced2739a218c3bf45bd0fb38f372ff43dd7 100644
|
| --- a/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| +++ b/third_party/WebKit/Source/web/tests/WebViewTest.cpp
|
| @@ -1585,7 +1585,6 @@ TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient)
|
| localFrame->close();
|
| }
|
|
|
| -#if OS(ANDROID)
|
| TEST_F(WebViewTest, LongPressSelection)
|
| {
|
| URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("longpress_selection.html"));
|
| @@ -1621,6 +1620,24 @@ TEST_F(WebViewTest, LongPressEmptyTextarea)
|
| EXPECT_EQ("", std::string(frame->selectionAsText().utf8().data()));
|
| }
|
|
|
| +TEST_F(WebViewTest, LongPressImageTextarea)
|
| +{
|
| + URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("longpress_image_contenteditable.html"));
|
| +
|
| + WebView* webView = m_webViewHelper.initializeAndLoad(m_baseURL + "longpress_image_contenteditable.html", true);
|
| + webView->resize(WebSize(500, 300));
|
| + webView->updateAllLifecyclePhases();
|
| + runPendingTasks();
|
| +
|
| + WebString image = WebString::fromUTF8("purpleimage");
|
| +
|
| + EXPECT_TRUE(tapElementById(WebInputEvent::GestureLongPress, image));
|
| + size_t location, length;
|
| + EXPECT_TRUE(toWebViewImpl(webView)->caretOrSelectionRange(&location, &length));
|
| + EXPECT_EQ(0UL, location);
|
| + EXPECT_EQ(1UL, length);
|
| +}
|
| +
|
| TEST_F(WebViewTest, BlinkCaretOnTypingAfterLongPress)
|
| {
|
| URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("blink_caret_on_typing_after_long_press.html"));
|
| @@ -1643,7 +1660,6 @@ TEST_F(WebViewTest, BlinkCaretOnTypingAfterLongPress)
|
| webView->handleInputEvent(keyEvent);
|
| EXPECT_FALSE(mainFrame->frame()->selection().isCaretBlinkingSuspended());
|
| }
|
| -#endif
|
|
|
| TEST_F(WebViewTest, BlinkCaretOnClosingContextMenu)
|
| {
|
|
|