Index: ui/compositor/test/in_process_context_factory.cc |
diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc |
index d9e3dc4197de72d9f166b062399591292c8fdedf..d51120a07e32d7de587930a38d9c5e011efa9416 100644 |
--- a/ui/compositor/test/in_process_context_factory.cc |
+++ b/ui/compositor/test/in_process_context_factory.cc |
@@ -67,6 +67,17 @@ |
DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) |
<< "If running tests, ensure that main() is calling " |
<< "gfx::GLSurface::InitializeOneOffForTests()"; |
+ |
+#if defined(OS_CHROMEOS) |
+ bool use_thread = !base::CommandLine::ForCurrentProcess()->HasSwitch( |
+ switches::kUIDisableThreadedCompositing); |
+#else |
+ bool use_thread = false; |
+#endif |
+ if (use_thread) { |
+ compositor_thread_.reset(new base::Thread("Browser Compositor")); |
+ compositor_thread_->Start(); |
+ } |
} |
InProcessContextFactory::~InProcessContextFactory() {} |