Chromium Code Reviews| Index: content/test/content_test_suite.cc |
| diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc |
| index 41b4bdb2523778783d505b9b6eb6a7d8079e2f9d..797cadd685f6f5ba3645d965a32e2cd2b6ef2106 100644 |
| --- a/content/test/content_test_suite.cc |
| +++ b/content/test/content_test_suite.cc |
| @@ -35,6 +35,10 @@ |
| #include "content/browser/android/in_process_surface_texture_manager.h" |
| #endif |
| +#if defined(USE_OZONE) |
| +#include "ui/ozone/public/native_pixmap_manager.h" |
| +#endif |
| + |
| namespace content { |
| namespace { |
| @@ -89,8 +93,9 @@ void ContentTestSuite::Initialize() { |
| media::InitializeMediaLibrary(); |
| // When running in a child process for Mac sandbox tests, the sandbox exists |
| // to initialize GL, so don't do it here. |
| - if (!base::CommandLine::ForCurrentProcess()->HasSwitch( |
| - switches::kTestChildProcess)) { |
| + bool is_child_process = base::CommandLine::ForCurrentProcess()->HasSwitch( |
| + switches::kTestChildProcess); |
| + if (!is_child_process) { |
| gfx::GLSurfaceTestSupport::InitializeOneOff(); |
| gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); |
| } |
| @@ -105,6 +110,12 @@ void ContentTestSuite::Initialize() { |
| #if defined(OS_MACOSX) && !defined(OS_IOS) |
| IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance()); |
| #endif |
| +#if defined(USE_OZONE) |
| + if (!is_child_process) { |
| + ui::NativePixmapManager::SetInstance( |
| + ui::NativePixmapManager::Create().release()); |
|
reveman
2015/07/23 18:25:23
Don't leak the manager instance here as well.
dshwang
2015/07/24 12:19:00
Done.
|
| + } |
| +#endif |
| } |
| } // namespace content |