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

Unified Diff: ash/test/ash_test_helper.cc

Issue 105813013: Adds views::corewm::WMState to install common state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix viewseventtestbase Created 7 years 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
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | chrome/browser/notifications/desktop_notifications_unittest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/test/ash_test_helper.cc
diff --git a/ash/test/ash_test_helper.cc b/ash/test/ash_test_helper.cc
index 2c2f2f7f831fe95bd3761e1971d961dab0334e3e..e544874aec0d84198c851d88303851c3edf73665 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() {
« no previous file with comments | « ash/test/ash_test_helper.h ('k') | chrome/browser/notifications/desktop_notifications_unittest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698