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

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

Issue 1314353004: Fix 3 more leaks in WebPluginContainerTests. (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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/web/tests/WebPluginContainerTest.cpp
diff --git a/Source/web/tests/WebPluginContainerTest.cpp b/Source/web/tests/WebPluginContainerTest.cpp
index 898bae924d7435a2c028415649cd87a9358ac6f5..d42df5345541324848ec384263889fd9732f45a6 100644
--- a/Source/web/tests/WebPluginContainerTest.cpp
+++ b/Source/web/tests/WebPluginContainerTest.cpp
@@ -208,8 +208,9 @@ TEST_F(WebPluginContainerTest, PrintAllPages)
TEST_F(WebPluginContainerTest, LocalToWindowPointTest)
{
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("plugin_container.html"));
+ TestPluginWebFrameClient pluginWebFrameClient; // Must outlive webViewHelper.
FrameTestHelpers::WebViewHelper webViewHelper;
- WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new TestPluginWebFrameClient());
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, &pluginWebFrameClient);
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
@@ -323,8 +324,9 @@ TEST_F(WebPluginContainerTest, GestureLongPressReachesPlugin)
URLTestHelpers::registerMockedURLFromBaseURL(
WebString::fromUTF8(m_baseURL.c_str()),
WebString::fromUTF8("plugin_container.html"));
+ EventTestPluginWebFrameClient pluginWebFrameClient; // Must outlive webViewHelper.
FrameTestHelpers::WebViewHelper webViewHelper;
- WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new EventTestPluginWebFrameClient());
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, &pluginWebFrameClient);
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
@@ -416,8 +418,9 @@ TEST_F(WebPluginContainerTest, TopmostAfterDetachTest)
};
URLTestHelpers::registerMockedURLFromBaseURL(WebString::fromUTF8(m_baseURL.c_str()), WebString::fromUTF8("plugin_container.html"));
+ TopmostPluginWebFrameClient pluginWebFrameClient; // Must outlive webViewHelper.
FrameTestHelpers::WebViewHelper webViewHelper;
- WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, new TopmostPluginWebFrameClient());
+ WebView* webView = webViewHelper.initializeAndLoad(m_baseURL + "plugin_container.html", true, &pluginWebFrameClient);
ASSERT(webView);
webView->settings()->setPluginsEnabled(true);
webView->resize(WebSize(300, 300));
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698