Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2283)

Unified Diff: content/test/content_test_suite.cc

Issue 1208603002: content: implement unittests backend for Ozone GBM Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix NavigationControllerTest failure Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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());
}
« no previous file with comments | « no previous file | ui/ozone/platform/caca/ozone_platform_caca.cc » ('j') | ui/ozone/platform/drm/ozone_platform_gbm.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698