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

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

Issue 10830029: Makes maximized windows go in their own workspace regardless of (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 5 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') | no next file » | 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 64b22c344f4231c4e870907004ff3eafec8638a1..4f6a5f86bffcb2cb218444c49337c50d9d6115fc 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -672,5 +672,27 @@ TEST_F(WorkspaceManagerTest, DontResetAnimation) {
EXPECT_TRUE(w1->GetProperty(aura::client::kAnimationsDisabledKey));
}
+// Verifies a window marked as persisting across all workspaces ends up in its
+// own workspace when maximized.
+TEST_F(WorkspaceManagerTest, MaximizeDontPersistEndsUpInOwnWorkspace) {
+ scoped_ptr<Window> w1(CreateTestWindow());
+
+ SetPersistsAcrossAllWorkspaces(
+ w1.get(),
+ WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES);
+ w1->Show();
+
+ // Shouldn't contain the window initially.
+ EXPECT_FALSE(manager_->Contains(w1.get()));
+
+ // Maximize should trigger containing the window.
+ w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ EXPECT_TRUE(manager_->Contains(w1.get()));
+
+ // And resetting to normal should remove it.
+ w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_NORMAL);
+ EXPECT_FALSE(manager_->Contains(w1.get()));
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/workspace/workspace_manager.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698