| OLD | NEW |
| 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 Loading... |
| 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 |
| OLD | NEW |