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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | ash/wm/workspace_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ash/wm/workspace/workspace_manager.h" 5 #include "ash/wm/workspace/workspace_manager.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "ash/ash_switches.h" 9 #include "ash/ash_switches.h"
10 #include "ash/root_window_controller.h" 10 #include "ash/root_window_controller.h"
(...skipping 1674 matching lines...) Expand 10 before | Expand all | Expand 10 after
1685 generator.ReleaseLeftButton(); 1685 generator.ReleaseLeftButton();
1686 SetTrackedByWorkspace(w1.get(), true); 1686 SetTrackedByWorkspace(w1.get(), true);
1687 // Marking the window tracked again should snap back to origin. 1687 // Marking the window tracked again should snap back to origin.
1688 EXPECT_EQ("0 M1 active=1", StateString()); 1688 EXPECT_EQ("0 M1 active=1", StateString());
1689 EXPECT_EQ(max_bounds.ToString(), w1->bounds().ToString()); 1689 EXPECT_EQ(max_bounds.ToString(), w1->bounds().ToString());
1690 EXPECT_EQ(0, observer.change_count()); 1690 EXPECT_EQ(0, observer.change_count());
1691 1691
1692 w1->parent()->parent()->RemoveObserver(&observer); 1692 w1->parent()->parent()->RemoveObserver(&observer);
1693 } 1693 }
1694 1694
1695 // Verifies that a new maximized window becomes visible after its activation
1696 // is requested, even though it does not become activated because a system
1697 // modal window is active.
1698 TEST_F(WorkspaceManagerTest, SwitchFromModal) {
1699 scoped_ptr<Window> modal_window(CreateTestWindowUnparented());
1700 modal_window->SetBounds(gfx::Rect(10, 11, 21, 22));
1701 modal_window->SetProperty(aura::client::kModalKey, ui::MODAL_TYPE_SYSTEM);
1702 SetDefaultParentByPrimaryRootWindow(modal_window.get());
1703 modal_window->Show();
1704 wm::ActivateWindow(modal_window.get());
1705
1706 scoped_ptr<Window> maximized_window(CreateTestWindow());
1707 maximized_window->SetProperty(
1708 aura::client::kShowStateKey, ui::SHOW_STATE_MAXIMIZED);
1709 maximized_window->Show();
1710 wm::ActivateWindow(maximized_window.get());
1711 EXPECT_TRUE(maximized_window->IsVisible());
1712 }
1713
1695 } // namespace internal 1714 } // namespace internal
1696 } // namespace ash 1715 } // namespace ash
OLDNEW
« 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