| 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..aaf664890c4a65a79188b6c3fae9fe49847fa6c1 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/client_native_pixmap_factory.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,13 @@ void ContentTestSuite::Initialize() {
|
| #if defined(OS_MACOSX) && !defined(OS_IOS)
|
| IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance());
|
| #endif
|
| +#if defined(USE_OZONE)
|
| + if (!is_child_process) {
|
| + client_native_pixmap_factory_ = ui::ClientNativePixmapFactory::Create();
|
| + ui::ClientNativePixmapFactory::SetInstance(
|
| + client_native_pixmap_factory_.get());
|
| + }
|
| +#endif
|
| }
|
|
|
| } // namespace content
|
|
|