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

Unified Diff: Source/web/tests/WebViewTest.cpp

Issue 981223003: Protect WebViewImpl::handleGestureEvent from null client (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Update test name Created 5 years, 9 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 | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebViewTest.cpp
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp
index e2caa90d24b416af5dd7d05e4aac2a9c8bf5c609..d7618c498f13405f6f08b7db543b30818d04c5f6 100644
--- a/Source/web/tests/WebViewTest.cpp
+++ b/Source/web/tests/WebViewTest.cpp
@@ -1274,6 +1274,18 @@ TEST_F(WebViewTest, ClientTapHandling)
m_webViewHelper.reset(); // Explicitly reset to break dependency on locally scoped client.
}
+TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient)
+{
+ WebViewImpl* webView = WebViewImpl::create(nullptr);
+ webView->setMainFrame(WebLocalFrame::create(nullptr));
+ WebGestureEvent event;
+ event.type = WebInputEvent::GestureTap;
+ event.x = 3;
+ event.y = 8;
+ EXPECT_FALSE(webView->handleInputEvent(event));
+ webView->close();
+}
+
#if OS(ANDROID)
TEST_F(WebViewTest, LongPressSelection)
{
« no previous file with comments | « Source/web/WebViewImpl.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698