Index: Source/web/tests/WebViewTest.cpp |
diff --git a/Source/web/tests/WebViewTest.cpp b/Source/web/tests/WebViewTest.cpp |
index 79f771b8c0a88d38d292a956dd8528edc921014c..dc03a9892c9d1b10a190650534cb0b536f33ff54 100644 |
--- a/Source/web/tests/WebViewTest.cpp |
+++ b/Source/web/tests/WebViewTest.cpp |
@@ -1501,13 +1501,16 @@ TEST_F(WebViewTest, ClientTapHandling) |
TEST_F(WebViewTest, ClientTapHandlingNullWebViewClient) |
{ |
WebViewImpl* webView = WebViewImpl::create(nullptr); |
- webView->setMainFrame(WebLocalFrame::create(WebTreeScopeType::Document, nullptr)); |
+ WebLocalFrame* localFrame = WebLocalFrame::create(WebTreeScopeType::Document, nullptr); |
+ webView->setMainFrame(localFrame); |
WebGestureEvent event; |
event.type = WebInputEvent::GestureTap; |
event.x = 3; |
event.y = 8; |
EXPECT_FALSE(webView->handleInputEvent(event)); |
webView->close(); |
+ // Explicitly close as the frame as no frame client to do so on frameDetached(). |
+ localFrame->close(); |
} |
#if OS(ANDROID) |