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

Unified Diff: ui/views/corewm/visibility_controller_unittest.cc

Issue 11316245: Move VisibilityController to corewm. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 1 month 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 | « ui/views/corewm/visibility_controller.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/corewm/visibility_controller_unittest.cc
===================================================================
--- ui/views/corewm/visibility_controller_unittest.cc (revision 170313)
+++ ui/views/corewm/visibility_controller_unittest.cc (working copy)
@@ -2,19 +2,20 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "ash/wm/visibility_controller.h"
+#include "ui/views/corewm/visibility_controller.h"
-#include "ash/test/ash_test_base.h"
+#include "ui/aura/root_window.h"
+#include "ui/aura/test/aura_test_base.h"
#include "ui/aura/test/test_window_delegate.h"
#include "ui/aura/test/test_windows.h"
#include "ui/aura/window.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animator.h"
-namespace ash {
-namespace internal {
+namespace views {
+namespace corewm {
-typedef test::AshTestBase VisibilityControllerTest;
+typedef aura::test::AuraTestBase VisibilityControllerTest;
// Hiding a window in an animatable container should not hide the window's layer
// immediately.
@@ -22,17 +23,19 @@
// We cannot disable animations for this test.
ui::LayerAnimator::set_disable_animations_for_test(false);
- scoped_ptr<aura::Window> container(CreateTestWindowInShellWithId(-1));
- SetChildWindowVisibilityChangesAnimated(container.get());
+ VisibilityController controller;
+ aura::client::SetVisibilityClient(root_window(), &controller);
+ SetChildWindowVisibilityChangesAnimated(root_window());
+
aura::test::TestWindowDelegate d;
scoped_ptr<aura::Window> animatable(
aura::test::CreateTestWindowWithDelegate(
- &d, -2, gfx::Rect(0, 0, 50, 50), container.get()));
+ &d, -2, gfx::Rect(0, 0, 50, 50), root_window()));
scoped_ptr<aura::Window> non_animatable(
aura::test::CreateTestWindowWithDelegateAndType(
&d, aura::client::WINDOW_TYPE_CONTROL, -3, gfx::Rect(51, 51, 50, 50),
- container.get()));
+ root_window()));
EXPECT_TRUE(animatable->IsVisible());
EXPECT_TRUE(animatable->layer()->visible());
animatable->Hide();
@@ -44,7 +47,9 @@
non_animatable->Hide();
EXPECT_FALSE(non_animatable->IsVisible());
EXPECT_FALSE(non_animatable->layer()->visible());
+
+ aura::client::SetVisibilityClient(root_window(), NULL);
}
-} // namespace internal
-} // namespace ash
+} // namespace corewm
+} // namespace views
« no previous file with comments | « ui/views/corewm/visibility_controller.cc ('k') | ui/views/views.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698