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 d51120a07e32d7de587930a38d9c5e011efa9416..16ccfd837f4df6ef5de91fdb1ab3411ffe1b2f1a 100644 |
--- a/ui/compositor/test/in_process_context_factory.cc |
+++ b/ui/compositor/test/in_process_context_factory.cc |
@@ -62,8 +62,10 @@ class DirectOutputSurface : public cc::OutputSurface { |
} // namespace |
-InProcessContextFactory::InProcessContextFactory() |
- : next_surface_id_namespace_(1u), use_test_surface_(true) { |
+InProcessContextFactory::InProcessContextFactory(bool context_factory_for_test) |
+ : next_surface_id_namespace_(1u), |
+ use_test_surface_(true), |
+ context_factory_for_test_(context_factory_for_test) { |
DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) |
<< "If running tests, ensure that main() is calling " |
<< "gfx::GLSurface::InitializeOneOffForTests()"; |
@@ -140,7 +142,9 @@ InProcessContextFactory::SharedMainThreadContextProvider() { |
void InProcessContextFactory::RemoveCompositor(Compositor* compositor) {} |
-bool InProcessContextFactory::DoesCreateTestContexts() { return false; } |
+bool InProcessContextFactory::DoesCreateTestContexts() { |
+ return context_factory_for_test_; |
+} |
cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
return &shared_bitmap_manager_; |