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

Unified Diff: ash/test/ash_interactive_ui_test_base.cc

Issue 2734933004: ash: Use SessionController instead of SessionStateDelegate (Closed)
Patch Set: rebase 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
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..82369209b7f4844101a9bcca7e4f8b17533101fc 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,31 @@
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();

Powered by Google App Engine
This is Rietveld 408576698