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 961f9b1085df6195a412afb47dead75c514973ba..f51d6ccf66f739ef7163531b0c96a0db1a8937ea 100644 |
--- a/ui/compositor/test/in_process_context_factory.cc |
+++ b/ui/compositor/test/in_process_context_factory.cc |
@@ -63,8 +63,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()"; |
@@ -142,7 +144,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_; |