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

Unified Diff: athena/test/base/athena_test_helper.cc

Issue 693643004: Make UserActivityDetector a singleton (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@athena_do_not_use_ash45
Patch Set: Created 6 years, 2 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: athena/test/base/athena_test_helper.cc
diff --git a/athena/test/base/athena_test_helper.cc b/athena/test/base/athena_test_helper.cc
index 538ed1c91cfb2db64d5bacd98b1e036a83e98748..457e614b65272e8dba7904ab138187e11edecacb 100644
--- a/athena/test/base/athena_test_helper.cc
+++ b/athena/test/base/athena_test_helper.cc
@@ -22,6 +22,7 @@
#include "ui/compositor/scoped_animation_duration_scale_mode.h"
#include "ui/wm/core/focus_controller.h"
#include "ui/wm/core/input_method_event_filter.h"
+#include "ui/wm/core/user_activity_detector.h"
#if defined(USE_X11)
#include "ui/base/x/x11_util.h"
@@ -60,6 +61,10 @@ void AthenaTestHelper::SetUp(ui::ContextFactory* context_factory) {
aura::test::EnvTestHelper(aura::Env::GetInstance())
.SetInputStateLookup(scoped_ptr<aura::InputStateLookup>());
+ // UserActivityDetector must be created before the athena environment is
+ // started.
+ wm::UserActivityDetector::Create();
+
// TODO(oshima): Use a BlockingPool task runner.
athena::StartAthenaEnv(file_thread_->message_loop_proxy());
athena::ExtensionsDelegate::CreateExtensionsDelegateForTest();
@@ -72,6 +77,7 @@ void AthenaTestHelper::TearDown() {
teardown_called_ = true;
athena::ShutdownAthena();
+ wm::UserActivityDetector::Shutdown();
aura::Env::DeleteInstance();
#if defined(USE_X11)

Powered by Google App Engine
This is Rietveld 408576698