| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/common/wm/maximize_mode/maximize_mode_window_manager.h" | 5 #include "ash/common/wm/maximize_mode/maximize_mode_window_manager.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 | 8 |
| 9 #include "ash/common/ash_switches.h" | 9 #include "ash/common/ash_switches.h" |
| 10 #include "ash/common/shelf/wm_shelf.h" | 10 #include "ash/common/shelf/wm_shelf.h" |
| (...skipping 1257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1268 TEST_F(MaximizeModeWindowManagerTest, ExitsOverview) { | 1268 TEST_F(MaximizeModeWindowManagerTest, ExitsOverview) { |
| 1269 // Bounds for windows we know can be controlled. | 1269 // Bounds for windows we know can be controlled. |
| 1270 gfx::Rect rect1(10, 10, 200, 50); | 1270 gfx::Rect rect1(10, 10, 200, 50); |
| 1271 gfx::Rect rect2(10, 60, 200, 50); | 1271 gfx::Rect rect2(10, 60, 200, 50); |
| 1272 std::unique_ptr<aura::Window> w1( | 1272 std::unique_ptr<aura::Window> w1( |
| 1273 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1)); | 1273 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1)); |
| 1274 std::unique_ptr<aura::Window> w2( | 1274 std::unique_ptr<aura::Window> w2( |
| 1275 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2)); | 1275 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2)); |
| 1276 | 1276 |
| 1277 WindowSelectorController* window_selector_controller = | 1277 WindowSelectorController* window_selector_controller = |
| 1278 WmShell::Get()->window_selector_controller(); | 1278 Shell::Get()->window_selector_controller(); |
| 1279 ASSERT_TRUE(window_selector_controller->ToggleOverview()); | 1279 ASSERT_TRUE(window_selector_controller->ToggleOverview()); |
| 1280 ASSERT_TRUE(window_selector_controller->IsSelecting()); | 1280 ASSERT_TRUE(window_selector_controller->IsSelecting()); |
| 1281 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); | 1281 MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); |
| 1282 ASSERT_TRUE(manager); | 1282 ASSERT_TRUE(manager); |
| 1283 EXPECT_FALSE(window_selector_controller->IsSelecting()); | 1283 EXPECT_FALSE(window_selector_controller->IsSelecting()); |
| 1284 | 1284 |
| 1285 ASSERT_TRUE(window_selector_controller->ToggleOverview()); | 1285 ASSERT_TRUE(window_selector_controller->ToggleOverview()); |
| 1286 ASSERT_TRUE(window_selector_controller->IsSelecting()); | 1286 ASSERT_TRUE(window_selector_controller->IsSelecting()); |
| 1287 // Destroy the manager again and check that the windows return to their | 1287 // Destroy the manager again and check that the windows return to their |
| 1288 // previous state. | 1288 // previous state. |
| (...skipping 408 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 EXPECT_EQ(1, observer.GetPostCountAndReset()); | 1697 EXPECT_EQ(1, observer.GetPostCountAndReset()); |
| 1698 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED, | 1698 EXPECT_EQ(wm::WINDOW_STATE_TYPE_MINIMIZED, |
| 1699 observer.GetLastOldStateAndReset()); | 1699 observer.GetLastOldStateAndReset()); |
| 1700 | 1700 |
| 1701 window_state->RemoveObserver(&observer); | 1701 window_state->RemoveObserver(&observer); |
| 1702 | 1702 |
| 1703 DestroyMaximizeModeWindowManager(); | 1703 DestroyMaximizeModeWindowManager(); |
| 1704 } | 1704 } |
| 1705 | 1705 |
| 1706 } // namespace ash | 1706 } // namespace ash |
| OLD | NEW |