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

Unified Diff: chrome/test/base/view_event_test_base.cc

Issue 115453004: Moves management of transients out of Window (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix MRUWindowTracker and MultiProfileMultiBrowserShelfLayoutChromeLauncherControllerTest 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
Index: chrome/test/base/view_event_test_base.cc
diff --git a/chrome/test/base/view_event_test_base.cc b/chrome/test/base/view_event_test_base.cc
index d88bf9cb214502811bd8199b2e2a1d0c180c4f7f..4b2c8c1121bb796fd53faeb5f2b744644b7f8468 100644
--- a/chrome/test/base/view_event_test_base.cc
+++ b/chrome/test/base/view_event_test_base.cc
@@ -31,6 +31,7 @@
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/test/aura_test_helper.h"
+#include "ui/views/corewm/transient_window_stacking_client.h"
#endif
#if defined(OS_CHROMEOS)
@@ -99,6 +100,12 @@ void ViewEventTestBase::Done() {
}
void ViewEventTestBase::SetUp() {
+#if defined(USE_AURA)
+ // SetWindowStackingClient() takes ownership of TransientWindowStackingClient.
+ aura::client::SetWindowStackingClient(
+ new views::corewm::TransientWindowStackingClient);
+#endif
+
views::ViewsDelegate::views_delegate = &views_delegate_;
ui::InitializeInputMethodForTesting();
gfx::NativeView context = NULL;
@@ -171,6 +178,10 @@ void ViewEventTestBase::TearDown() {
ui::ShutdownInputMethodForTesting();
views::ViewsDelegate::views_delegate = NULL;
+
+#if defined(USE_AURA)
+ aura::client::SetWindowStackingClient(NULL);
+#endif
}
bool ViewEventTestBase::CanResize() const {

Powered by Google App Engine
This is Rietveld 408576698