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

Unified Diff: ui/views/corewm/shadow_controller_unittest.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: ui/views/corewm/shadow_controller_unittest.cc
diff --git a/ui/views/corewm/shadow_controller_unittest.cc b/ui/views/corewm/shadow_controller_unittest.cc
index 4140f7d83fb5bd38da9780a14f99bc1f2a3e7f0a..dc3035b0f26198c2ce9505e5c69a8e5a15940276 100644
--- a/ui/views/corewm/shadow_controller_unittest.cc
+++ b/ui/views/corewm/shadow_controller_unittest.cc
@@ -11,29 +11,30 @@
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/window_tree_client.h"
#include "ui/aura/root_window.h"
-#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/views/corewm/shadow.h"
#include "ui/views/corewm/shadow_types.h"
+#include "ui/views/corewm/transient_window_manager.h"
+#include "ui/views/test/views_test_base.h"
namespace views {
namespace corewm {
-class ShadowControllerTest : public aura::test::AuraTestBase {
+class ShadowControllerTest : public ViewsTestBase {
public:
ShadowControllerTest() {}
virtual ~ShadowControllerTest() {}
virtual void SetUp() OVERRIDE {
- AuraTestBase::SetUp();
+ ViewsTestBase::SetUp();
aura::client::ActivationClient* activation_client =
- aura::client::GetActivationClient(root_window());
+ aura::client::GetActivationClient(GetContext());
shadow_controller_.reset(new ShadowController(activation_client));
}
virtual void TearDown() OVERRIDE {
shadow_controller_.reset();
- AuraTestBase::TearDown();
+ ViewsTestBase::TearDown();
}
protected:
@@ -46,6 +47,10 @@ class ShadowControllerTest : public aura::test::AuraTestBase {
window);
}
+ void ParentWindow(aura::Window* window) {
+ aura::client::ParentWindowWithContext(window, GetContext(), gfx::Rect());
+ }
+
private:
scoped_ptr<ShadowController> shadow_controller_;
@@ -201,7 +206,7 @@ TEST_F(ShadowControllerTest, TransientParentKeepsActiveShadow) {
window2->Init(ui::LAYER_TEXTURED);
ParentWindow(window2.get());
window2->SetBounds(gfx::Rect(11, 21, 301, 401));
- window1->AddTransientChild(window2.get());
+ AddTransientChild(window1.get(), window2.get());
aura::client::SetHideOnDeactivate(window2.get(), true);
window2->Show();
ActivateWindow(window2.get());

Powered by Google App Engine
This is Rietveld 408576698