Index: content/test/content_test_suite.cc |
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc |
index 116bd0ce472064bf8445bc610e3bafd172f4f860..91d5f1fa7fb883d10ac46060c333f87f111ff0b2 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 "content/test/test_native_pixmap_manager_ozone.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::GLSurface::InitializeOneOffForTests(); |
gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess()); |
} |
@@ -105,6 +110,13 @@ void ContentTestSuite::Initialize() { |
#if defined(OS_MACOSX) && !defined(OS_IOS) |
IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance()); |
#endif |
+#if defined(USE_OZONE) |
+ if (!is_child_process) { |
+ DCHECK(!ui::NativePixmapManager::GetInstance()); |
+ ui::NativePixmapManager::SetInstance( |
+ TestNativePixmapManager::GetInstance()); |
+ } |
+#endif |
} |
} // namespace content |