diff options
Diffstat (limited to 'content/test/content_test_suite.cc')
-rw-r--r-- | content/test/content_test_suite.cc | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/content/test/content_test_suite.cc b/content/test/content_test_suite.cc index 3618365..71cec54 100644 --- a/content/test/content_test_suite.cc +++ b/content/test/content_test_suite.cc @@ -5,6 +5,8 @@ #include "content/test/content_test_suite.h" #include "base/base_paths.h" +#include "base/base_switches.h" +#include "base/command_line.h" #include "base/logging.h" #include "base/path_service.h" #include "content/public/test/test_content_client_initializer.h" @@ -12,6 +14,10 @@ #include "testing/gtest/include/gtest/gtest.h" #include "ui/base/resource/resource_bundle.h" +#if !defined(OS_IOS) +#include "ui/gl/gl_surface.h" +#endif + #if defined(OS_MACOSX) #include "base/mac/scoped_nsautorelease_pool.h" #endif @@ -65,6 +71,13 @@ void ContentTestSuite::Initialize() { ContentTestSuiteBase::Initialize(); +#if !defined(OS_IOS) + // When running in a child process for Mac sandbox tests, the sandbox exists + // to initialize GL, so don't do it here. + if (!CommandLine::ForCurrentProcess()->HasSwitch(switches::kTestChildProcess)) + gfx::GLSurface::InitializeOneOffForTests(); +#endif + testing::TestEventListeners& listeners = testing::UnitTest::GetInstance()->listeners(); listeners.Append(new TestInitializationListener); |