| Index: ash/test/ash_test_helper.cc
|
| diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
|
| index 86a50d5399736d6253fc5f22321da35f9ced4e27..2b746db4cea3b4143721978a239ea74a48cd5701 100644
|
| --- a/ash/test/ash_test_helper.cc
|
| +++ b/ash/test/ash_test_helper.cc
|
| @@ -25,6 +25,7 @@
|
| #include "ui/compositor/test/context_factories_for_test.h"
|
| #include "ui/message_center/message_center.h"
|
| #include "ui/wm/core/capture_controller.h"
|
| +#include "ui/wm/core/user_activity_detector.h"
|
|
|
| #if defined(OS_CHROMEOS)
|
| #include "chromeos/audio/cras_audio_handler.h"
|
| @@ -87,6 +88,9 @@ void AshTestHelper::SetUp(bool start_session) {
|
| // Create CrasAudioHandler for testing since g_browser_process is not
|
| // created in AshTestBase tests.
|
| chromeos::CrasAudioHandler::InitializeForTesting();
|
| +
|
| + // The UserActivityDetector must be created before the shell is created.
|
| + wm::UserActivityDetector::Create();
|
| #endif
|
| ShellInitParams init_params;
|
| init_params.delegate = test_shell_delegate_;
|
| @@ -121,6 +125,8 @@ void AshTestHelper::TearDown() {
|
| message_center::MessageCenter::Shutdown();
|
|
|
| #if defined(OS_CHROMEOS)
|
| + wm::UserActivityDetector::Shutdown();
|
| +
|
| chromeos::CrasAudioHandler::Shutdown();
|
| if (dbus_thread_manager_initialized_) {
|
| chromeos::DBusThreadManager::Shutdown();
|
|
|