summaryrefslogtreecommitdiffstats
path: root/ash/test/ash_test_helper.cc
diff options
context:
space:
mode:
authorsky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 17:55:00 +0000
committersky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-20 17:55:00 +0000
commitef663fa86cfec242f72cee7bd4b62e8bd52dc14e (patch)
tree453ba5a130f8d6729b3f5da4df6cd753b0dc67ae /ash/test/ash_test_helper.cc
parentc0914a598aa7e0d3d959820f6cb041398e46b6a4 (diff)
downloadchromium_src-ef663fa86cfec242f72cee7bd4b62e8bd52dc14e.zip
chromium_src-ef663fa86cfec242f72cee7bd4b62e8bd52dc14e.tar.gz
chromium_src-ef663fa86cfec242f72cee7bd4b62e8bd52dc14e.tar.bz2
Adds views::corewm::WMState to install common state
I'm going to need to install a another singleton client for transients. Rather than touch all places to explicitly set n clients I'm creating Environment to centralize common setup and teardown. BUG=none TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/105813013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@242126 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/test/ash_test_helper.cc')
-rw-r--r--ash/test/ash_test_helper.cc10
1 files changed, 4 insertions, 6 deletions
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 2c2f2f7..e544874 100644
--- a/ash/test/ash_test_helper.cc
+++ b/ash/test/ash_test_helper.cc
@@ -22,7 +22,7 @@
#include "ui/compositor/test/context_factories_for_test.h"
#include "ui/message_center/message_center.h"
#include "ui/views/corewm/capture_controller.h"
-#include "ui/views/corewm/transient_window_stacking_client.h"
+#include "ui/views/corewm/wm_state.h"
#if defined(OS_CHROMEOS)
#include "chromeos/audio/cras_audio_handler.h"
@@ -51,6 +51,8 @@ AshTestHelper::~AshTestHelper() {
}
void AshTestHelper::SetUp(bool start_session) {
+ wm_state_.reset(new views::corewm::WMState);
+
// Disable animations during tests.
zero_duration_mode_.reset(new ui::ScopedAnimationDurationScaleMode(
ui::ScopedAnimationDurationScaleMode::ZERO_DURATION));
@@ -95,10 +97,6 @@ void AshTestHelper::SetUp(bool start_session) {
test_screenshot_delegate_ = new TestScreenshotDelegate();
shell->accelerator_controller()->SetScreenshotDelegate(
scoped_ptr<ScreenshotDelegate>(test_screenshot_delegate_));
-
- // SetWindowStackingClient() takes ownership of TransientWindowStackingClient.
- aura::client::SetWindowStackingClient(
- new views::corewm::TransientWindowStackingClient);
}
void AshTestHelper::TearDown() {
@@ -128,7 +126,7 @@ void AshTestHelper::TearDown() {
CHECK(!views::corewm::ScopedCaptureClient::IsActive());
- aura::client::SetWindowStackingClient(NULL);
+ wm_state_.reset();
}
void AshTestHelper::RunAllPendingInMessageLoop() {