| 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..743848047b14d3be4fab8a4d049f111d516f49af 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/ozone_platform.h"
|
| +#endif
|
| +
|
| namespace content {
|
| namespace {
|
|
|
| @@ -78,6 +82,15 @@ void ContentTestSuite::Initialize() {
|
| #if defined(OS_WIN)
|
| gfx::InitDeviceScaleFactor(1.0f);
|
| #endif
|
| +#if !defined(OS_IOS)
|
| + bool is_child_process = base::CommandLine::ForCurrentProcess()->HasSwitch(
|
| + switches::kTestChildProcess);
|
| +#if defined(USE_OZONE)
|
| + if (!is_child_process) {
|
| + ui::OzonePlatform::InitializeForTest();
|
| + }
|
| +#endif
|
| +#endif
|
|
|
| ContentTestSuiteBase::Initialize();
|
| {
|
| @@ -89,8 +102,7 @@ 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)) {
|
| + if (!is_child_process) {
|
| gfx::GLSurface::InitializeOneOffForTests();
|
| gpu::ApplyGpuDriverBugWorkarounds(base::CommandLine::ForCurrentProcess());
|
| }
|
|
|