Index: ash/test/test_shell_delegate.cc |
diff --git a/ash/test/test_shell_delegate.cc b/ash/test/test_shell_delegate.cc |
index 532876ec851a7f44b5202adac74ca45a65f1aea7..a21eddcd03c10862576a59ca287a86db3d9e21a9 100644 |
--- a/ash/test/test_shell_delegate.cc |
+++ b/ash/test/test_shell_delegate.cc |
@@ -17,6 +17,7 @@ |
#include "base/logging.h" |
#include "content/public/test/test_browser_context.h" |
#include "ui/aura/window.h" |
+#include "ui/compositor/compositor.h" |
namespace ash { |
namespace test { |
@@ -213,6 +214,10 @@ double TestShellDelegate::GetSavedScreenMagnifierScale() { |
} |
RootWindowHostFactory* TestShellDelegate::CreateRootWindowHostFactory() { |
+ // The ContextFactory must exist before any Compositors are created. |
+ bool allow_test_contexts = true; |
+ ui::Compositor::InitializeContextFactoryForTests(allow_test_contexts); |
+ |
return RootWindowHostFactory::Create(); |
} |