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

Unified Diff: ash/wm/overview/window_selector_unittest.cc

Issue 25551002: Fix visibility of minimized panels when restoring from overview. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Alternate workaround. Created 7 years, 3 months 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/overview/scoped_transform_overview_window.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/overview/window_selector_unittest.cc
diff --git a/ash/wm/overview/window_selector_unittest.cc b/ash/wm/overview/window_selector_unittest.cc
index d464e841bf022a74d157cde816354fb7688bea50..b3d989fc2c303c2be7075a2d930b892d9ec0d3d9 100644
--- a/ash/wm/overview/window_selector_unittest.cc
+++ b/ash/wm/overview/window_selector_unittest.cc
@@ -199,6 +199,31 @@ TEST_F(WindowSelectorTest, OverviewUndimsShelf) {
EXPECT_TRUE(shelf->GetDimsShelf());
}
+// Tests that a minimized window's visibility and layer visibility is correctly
+// changed when entering overview and restored when leaving overview mode.
+TEST_F(WindowSelectorTest, MinimizedWindowVisibility) {
+ gfx::Rect bounds(0, 0, 400, 400);
+ scoped_ptr<aura::Window> window1(CreateWindow(bounds));
+ wm::WindowState* window_state = wm::GetWindowState(window1.get());
+ window_state->Minimize();
+ EXPECT_FALSE(window1->IsVisible());
+ EXPECT_FALSE(window1->layer()->GetTargetVisibility());
+ {
+ ui::ScopedAnimationDurationScaleMode normal_duration_mode(
+ ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
+ ToggleOverview();
+ EXPECT_TRUE(window1->IsVisible());
+ EXPECT_TRUE(window1->layer()->GetTargetVisibility());
+ }
+ {
+ ui::ScopedAnimationDurationScaleMode normal_duration_mode(
+ ui::ScopedAnimationDurationScaleMode::NORMAL_DURATION);
+ ToggleOverview();
+ EXPECT_FALSE(window1->IsVisible());
+ EXPECT_FALSE(window1->layer()->GetTargetVisibility());
+ }
+}
+
// Tests entering overview mode with three windows and cycling through them.
TEST_F(WindowSelectorTest, BasicCycle) {
gfx::Rect bounds(0, 0, 400, 400);
« no previous file with comments | « ash/wm/overview/scoped_transform_overview_window.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698