summaryrefslogtreecommitdiffstats
path: root/ash/test/ash_test_helper.cc
diff options
context:
space:
mode:
authorben <ben@chromium.org>2015-10-06 14:29:28 -0700
committerCommit bot <commit-bot@chromium.org>2015-10-06 21:30:07 +0000
commitf6de985ddb1ee40a38cafdad70928f9304f124d0 (patch)
treed36fa88201c2e4ad1159a182e577fdbbce851191 /ash/test/ash_test_helper.cc
parent3ef2644f5b822155c2eb7edff674f73840253282 (diff)
downloadchromium_src-f6de985ddb1ee40a38cafdad70928f9304f124d0.zip
chromium_src-f6de985ddb1ee40a38cafdad70928f9304f124d0.tar.gz
chromium_src-f6de985ddb1ee40a38cafdad70928f9304f124d0.tar.bz2
Make ScreenOrientationController not depend on content.
R=sky@chromium.org http://crbug.com/332504 Review URL: https://codereview.chromium.org/1386983002 Cr-Commit-Position: refs/heads/master@{#352689}
Diffstat (limited to 'ash/test/ash_test_helper.cc')
-rw-r--r--ash/test/ash_test_helper.cc11
1 files changed, 8 insertions, 3 deletions
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index a01da66..995b9f5 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -49,7 +49,8 @@ AshTestHelper::AshTestHelper(base::MessageLoopForUI* message_loop)
: message_loop_(message_loop),
test_shell_delegate_(nullptr),
test_screenshot_delegate_(nullptr),
- content_state_(nullptr) {
+ content_state_(nullptr),
+ test_shell_content_state_(nullptr) {
CHECK(message_loop_);
#if defined(OS_CHROMEOS)
dbus_thread_manager_initialized_ = false;
@@ -94,8 +95,12 @@ void AshTestHelper::SetUp(bool start_session) {
// created in AshTestBase tests.
chromeos::CrasAudioHandler::InitializeForTesting();
#endif
- ShellContentState::SetInstance(content_state_ ? content_state_
- : new TestShellContentState);
+ ShellContentState* content_state = content_state_;
+ if (!content_state) {
+ test_shell_content_state_ = new TestShellContentState;
+ content_state = test_shell_content_state_;
+ }
+ ShellContentState::SetInstance(content_state);
ShellInitParams init_params;
init_params.delegate = test_shell_delegate_;