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

Unified Diff: content/test/content_test_suite.cc

Issue 1128113011: ozone: Introduce ClientPixmap and ClientPixmapFactory for non-GPU processes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove ChildNativePixmapManager or BrowserNativePixmapManager Created 5 years, 5 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 41b4bdb2523778783d505b9b6eb6a7d8079e2f9d..7430cd8b0e5a4d3b0b66ef64cd179cc81002cf95 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/native_pixmap_manager.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,12 @@ void ContentTestSuite::Initialize() {
#if defined(OS_MACOSX) && !defined(OS_IOS)
IOSurfaceManager::SetInstance(InProcessIOSurfaceManager::GetInstance());
#endif
+#if defined(USE_OZONE)
+ if (!is_child_process) {
reveman 2015/07/23 14:46:12 why do you need this "!is_child_process" check?
dshwang 2015/07/23 16:42:09 good question. why gfx::GLSurfaceTestSupport::Init
reveman 2015/07/23 18:25:23 Well it's probably called later in that case. Mayb
dshwang 2015/07/24 12:19:00 I'm fixing unittests for ozone in https://coderevi
+ DCHECK(!ui::NativePixmapManager::GetInstance());
reveman 2015/07/23 14:46:12 nit: remove this DCHECK, SetInstance already does
dshwang 2015/07/23 16:42:09 Done.
+ ui::NativePixmapManager::SetInstance(ui::NativePixmapManager::Create());
reveman 2015/07/23 14:46:12 should we be using CreateNativePixmapManagerTest()
dshwang 2015/07/23 16:42:09 CreateNativePixmapManagerTest() is not public for
+ }
+#endif
}
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698