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

Unified Diff: ash/test/ash_interactive_ui_test_base.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase to get WorkspaceLayoutManagerSoloTest change Created 3 years, 9 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
« no previous file with comments | « ash/test/BUILD.gn ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_interactive_ui_test_base.cc
diff --git a/ash/test/ash_interactive_ui_test_base.cc b/ash/test/ash_interactive_ui_test_base.cc
index 4b246c6c904b697e432db42954207bf3960c1659..4a7e6c0987468c8917147c72d0e7664db928c61a 100644
--- a/ash/test/ash_interactive_ui_test_base.cc
+++ b/ash/test/ash_interactive_ui_test_base.cc
@@ -4,7 +4,9 @@
#include "ash/test/ash_interactive_ui_test_base.h"
+#include "base/lazy_instance.h"
#include "base/path_service.h"
+#include "mojo/edk/embedder/embedder.h"
#include "ui/aura/env.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_paths.h"
@@ -13,11 +15,29 @@
namespace ash {
namespace test {
+namespace {
+
+class MojoInitializer {
+ public:
+ MojoInitializer() { mojo::edk::Init(); }
+};
+
+base::LazyInstance<MojoInitializer>::Leaky mojo_initializer;
+
+// Initialize mojo once per process.
+void InitializeMojo() {
+ mojo_initializer.Get();
+}
+
+} // namespace
+
AshInteractiveUITestBase::AshInteractiveUITestBase() {}
AshInteractiveUITestBase::~AshInteractiveUITestBase() {}
void AshInteractiveUITestBase::SetUp() {
+ InitializeMojo();
+
gl::GLSurfaceTestSupport::InitializeOneOff();
ui::RegisterPathProvider();
« no previous file with comments | « ash/test/BUILD.gn ('k') | ash/test/ash_test_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698