650#if OS(ANDROID)
651TEST_F(WebViewTest, LongPressSelection)
652{
653 URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("longpress_selection.html"));
654
655 WebView* webView = FrameTestHelpers::createWebViewAndLoad(m_baseURL + "longpress_selection.html", true);
656 webView->resize(WebSize(500, 300));
657 webView->layout();
658 webkit_support::RunAllPendingMessages();
659
660 WebString target = WebString::fromUTF8("target");
661 WebString onselectstartfalse = WebString::fromUTF8("onselectstartfalse");
662 WebFrameImpl* frame = static_cast<WebFrameImpl*>(webView->mainFrame());
663
664 EXPECT_TRUE(tapElementById(webView, WebInputEvent::GestureLongPress, onselectstartfalse));
665 EXPECT_EQ("", std::string(frame->selectionAsText().utf8().data()));
666 EXPECT_TRUE(tapElementById(webView, WebInputEvent::GestureLongPress, target));
667 EXPECT_EQ("testword", std::string(frame->selectionAsText().utf8().data()));
668 webView->close();
669}
670#endif
671