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

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

Issue 14222019: Trying to activate a window in a workspace other than the current is ignored while a system modal d… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: nits 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
« no previous file with comments | « no previous file | ash/wm/workspace_controller.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 cf852b84695992ba20fc7945ac3d895ffc79bebc..5c0c96a8f456c6309c4dcd52801d1833d0f610dd 100644
--- a/ash/wm/workspace/workspace_manager_unittest.cc
+++ b/ash/wm/workspace/workspace_manager_unittest.cc
@@ -1692,5 +1692,24 @@ TEST_F(WorkspaceManagerTest, DragMaximizedNonTrackedWindow) {
w1->parent()->parent()->RemoveObserver(&observer);
}
+// Verifies that a new maximized window becomes visible after its activation
+// is requested, even though it does not become activated because a system
+// modal window is active.
+TEST_F(WorkspaceManagerTest, SwitchFromModal) {
+ scoped_ptr<Window> modal_window(CreateTestWindowUnparented());
+ modal_window->SetBounds(gfx::Rect(10, 11, 21, 22));
+ modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
+ SetDefaultParentByPrimaryRootWindow(modal_window.get());
+ modal_window->Show();
+ wm::ActivateWindow(modal_window.get());
+
+ scoped_ptr<Window> maximized_window(CreateTestWindow());
+ maximized_window->SetProperty(
+ aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
+ maximized_window->Show();
+ wm::ActivateWindow(maximized_window.get());
+ EXPECT_TRUE(maximized_window->IsVisible());
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « no previous file | ash/wm/workspace_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698