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

Unified Diff: content/public/test/render_view_test.cc

Issue 137023014: Added ScopedNSAutoreleasePool to RenderViewTest. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch for landing Created 6 years, 10 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 | « content/public/test/render_view_test.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/render_view_test.cc
diff --git a/content/public/test/render_view_test.cc b/content/public/test/render_view_test.cc
index c416114fe148b45d243413b4dfb2d3d19c19c837..5de488bbdc8c996051b1c80d4112719db97f4a61 100644
--- a/content/public/test/render_view_test.cc
+++ b/content/public/test/render_view_test.cc
@@ -28,6 +28,10 @@
#include "ui/base/resource/resource_bundle.h"
#include "v8/include/v8.h"
+#if defined(OS_MACOSX)
+#include "base/mac/scoped_nsautorelease_pool.h"
+#endif
+
using blink::WebFrame;
using blink::WebInputEvent;
using blink::WebMouseEvent;
@@ -143,6 +147,9 @@ void RenderViewTest::SetUp() {
render_thread_->set_new_window_routing_id(kNewWindowRouteId);
render_thread_->set_new_frame_routing_id(kNewFrameRouteId);
+#if defined(OS_MACOSX)
+ autorelease_pool_.reset(new base::mac::ScopedNSAutoreleasePool());
+#endif
command_line_.reset(new CommandLine(CommandLine::NO_PROGRAM));
params_.reset(new MainFunctionParams(*command_line_));
platform_.reset(new RendererMainPlatformDelegate(*params_));
@@ -210,6 +217,11 @@ void RenderViewTest::TearDown() {
// (http://crbug.com/21508).
base::RunLoop().RunUntilIdle();
+#if defined(OS_MACOSX)
+ // Needs to run before blink::shutdown().
+ autorelease_pool_.reset(NULL);
+#endif
+
blink::shutdown();
platform_->PlatformUninitialize();
« no previous file with comments | « content/public/test/render_view_test.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698