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

Unified Diff: ash/wm/workspace/workspace_manager_unittest.cc

Issue 9557005: Makes sure switching workspaces only animations windows that want to (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 10 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/workspace/workspace_manager.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_manager_unittest.cc
diff --git a/ash/wm/workspace/workspace_manager_unittest.cc b/ash/wm/workspace/workspace_manager_unittest.cc
index e136100f41b965697404ded7b707781b0be35adc..7d9acd8d686c3fd469890c2628f7335207a666b1 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -396,5 +396,30 @@ TEST_F(WorkspaceManagerTest, SingleFullscreenWindow) {
EXPECT_EQ(gfx::Rect(0, 0, 250, 251), *GetRestoreBounds(w1.get()));
}
+// Makes sure switching workspaces doesn't show transient windows.
+TEST_F(WorkspaceManagerTest, DontShowTransientsOnSwitch) {
+ scoped_ptr<Window> w1(CreateTestWindow());
+ scoped_ptr<Window> w2(CreateTestWindow());
+
+ w1->SetBounds(gfx::Rect(0, 0, 250, 251));
+ w2->SetBounds(gfx::Rect(0, 0, 250, 251));
+ w1->AddTransientChild(w2.get());
+
+ w1->Show();
+
+ scoped_ptr<Window> w3(CreateTestWindow());
+ w3->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ w3->Show();
+
+ EXPECT_FALSE(w1->layer()->IsDrawn());
+ EXPECT_FALSE(w2->layer()->IsDrawn());
+ EXPECT_TRUE(w3->layer()->IsDrawn());
+
+ w1->Show();
+ EXPECT_TRUE(w1->layer()->IsDrawn());
+ EXPECT_FALSE(w2->layer()->IsDrawn());
+ EXPECT_FALSE(w3->layer()->IsDrawn());
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | ui/aura/window.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698