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

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

Issue 1273023002: Fix WebLocalFrame leaks in unit tests. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 4 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/tests/WebFrameTest.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 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)
« no previous file with comments | « Source/web/tests/WebFrameTest.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698