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

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

Issue 13867010: ash: Fix transient child in wrong workspace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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
« ash/wm/workspace/workspace.cc ('K') | « ash/wm/workspace/workspace.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 823848d7db3f53a13426d665ec47b078da8e6565..cf852b84695992ba20fc7945ac3d895ffc79bebc 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -452,6 +452,30 @@ TEST_F(WorkspaceManagerTest, DontShowTransientsOnSwitch) {
EXPECT_FALSE(w3->layer()->IsDrawn());
}
+// Persists-across-all-workspace flag should not cause a transient child
+// to be activated at desktop workspace.
+TEST_F(WorkspaceManagerTest, PersistsTransientChildStayInSameWorkspace) {
+ scoped_ptr<Window> w1(CreateTestWindow());
+ SetPersistsAcrossAllWorkspaces(
+ w1.get(),
+ WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES);
+ w1->SetProperty(aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ w1->Show();
+ wm::ActivateWindow(w1.get());
+ ASSERT_EQ("0 M1 active=1", StateString());
+
+ scoped_ptr<Window> w2(CreateTestWindowUnparented());
+ w1->AddTransientChild(w2.get());
+ SetPersistsAcrossAllWorkspaces(
+ w2.get(),
+ WINDOW_PERSISTS_ACROSS_ALL_WORKSPACES_VALUE_YES);
+ SetDefaultParentByPrimaryRootWindow(w2.get());
+ w2->Show();
+ wm::ActivateWindow(w2.get());
+
+ ASSERT_EQ("0 M2 active=1", StateString());
+}
+
// Assertions around minimizing a single window.
TEST_F(WorkspaceManagerTest, MinimizeSingleWindow) {
scoped_ptr<Window> w1(CreateTestWindow());
« ash/wm/workspace/workspace.cc ('K') | « ash/wm/workspace/workspace.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698