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

Unified Diff: ash/wm/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 | « ash/wm/visibility_controller.cc ('k') | ash/wm/window_properties.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/visibility_controller_unittest.cc
===================================================================
--- ash/wm/visibility_controller_unittest.cc (revision 170313)
+++ ash/wm/visibility_controller_unittest.cc (working copy)
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// 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 "ash/test/ash_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 {
-
-typedef test::AshTestBase VisibilityControllerTest;
-
-// Hiding a window in an animatable container should not hide the window's layer
-// immediately.
-TEST_F(VisibilityControllerTest, AnimateHideDoesntHideWindowLayer) {
- // 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());
-
- aura::test::TestWindowDelegate d;
- scoped_ptr<aura::Window> animatable(
- aura::test::CreateTestWindowWithDelegate(
- &d, -2, gfx::Rect(0, 0, 50, 50), container.get()));
- scoped_ptr<aura::Window> non_animatable(
- aura::test::CreateTestWindowWithDelegateAndType(
- &d, aura::client::WINDOW_TYPE_CONTROL, -3, gfx::Rect(51, 51, 50, 50),
- container.get()));
- EXPECT_TRUE(animatable->IsVisible());
- EXPECT_TRUE(animatable->layer()->visible());
- animatable->Hide();
- EXPECT_FALSE(animatable->IsVisible());
- EXPECT_TRUE(animatable->layer()->visible());
-
- EXPECT_TRUE(non_animatable->IsVisible());
- EXPECT_TRUE(non_animatable->layer()->visible());
- non_animatable->Hide();
- EXPECT_FALSE(non_animatable->IsVisible());
- EXPECT_FALSE(non_animatable->layer()->visible());
-}
-
-} // namespace internal
-} // namespace ash
« no previous file with comments | « ash/wm/visibility_controller.cc ('k') | ash/wm/window_properties.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698