Chromium Code Reviews| 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..aef433792e759a3ae6cddbc1ab2badfc379875ee 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,10 @@ void RenderViewTest::TearDown() { |
| // (http://crbug.com/21508). |
| base::RunLoop().RunUntilIdle(); |
| +#if defined(OS_MACOSX) |
| + autorelease_pool_.reset(NULL); |
|
Nico
2014/02/04 16:12:51
Is this necessary? The destructor will run this au
tasak
2014/02/05 04:23:02
Yes. This should be done before blink::shutdown().
Nico
2014/02/05 04:58:22
Cool. Say "// Needs to run before blink::shutdown(
tasak
2014/02/05 05:16:02
Sure. Done.
|
| +#endif |
| + |
| blink::shutdown(); |
| platform_->PlatformUninitialize(); |