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

Unified Diff: Source/WebKit/chromium/tests/WebFrameTest.cpp

Issue 12086096: Merge 141019 (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1364/
Patch Set: Created 7 years, 11 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
Index: Source/WebKit/chromium/tests/WebFrameTest.cpp
===================================================================
--- Source/WebKit/chromium/tests/WebFrameTest.cpp (revision 141474)
+++ Source/WebKit/chromium/tests/WebFrameTest.cpp (working copy)
@@ -1697,6 +1697,39 @@
EXPECT_FALSE(client.triggered());
}
+TEST_F(WebFrameTest, DisambiguationPopupMobileSite)
+{
+ registerMockedHttpURLLoad("disambiguation_popup_mobile_site.html");
+
+ DisambiguationPopupTestWebViewClient client;
+
+ // Make sure we initialize to minimum scale, even if the window size
+ // only becomes available after the load begins.
+ WebViewImpl* webViewImpl = static_cast<WebViewImpl*>(FrameTestHelpers::createWebViewAndLoad(m_baseURL + "disambiguation_popup.html", true, 0, &client));
+ webViewImpl->resize(WebSize(1000, 1000));
+ webViewImpl->layout();
+
+ client.resetTriggered();
+ webViewImpl->handleInputEvent(fatTap(0, 0));
+ EXPECT_FALSE(client.triggered());
+
+ client.resetTriggered();
+ webViewImpl->handleInputEvent(fatTap(200, 115));
+ EXPECT_FALSE(client.triggered());
+
+ for (int i = 0; i <= 46; i++) {
+ client.resetTriggered();
+ webViewImpl->handleInputEvent(fatTap(120, 230 + i * 5));
+ EXPECT_FALSE(client.triggered());
+ }
+
+ for (int i = 0; i <= 46; i++) {
+ client.resetTriggered();
+ webViewImpl->handleInputEvent(fatTap(10 + i * 5, 590));
+ EXPECT_FALSE(client.triggered());
+ }
+}
+
class TestSubstituteDataWebFrameClient : public WebFrameClient {
public:
TestSubstituteDataWebFrameClient()
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.cpp ('k') | Source/WebKit/chromium/tests/data/disambiguation_popup_mobile_site.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698