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

Side by Side Diff: ash/wm/maximize_mode/maximize_mode_window_manager_unittest.cc

Issue 2084503007: Moves WindowSelectorController onto WmShell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@move_overview
Patch Set: fix mash Created 4 years, 6 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
OLDNEW
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/wm/maximize_mode/maximize_mode_window_manager.h" 5 #include "ash/wm/maximize_mode/maximize_mode_window_manager.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "ash/aura/wm_window_aura.h" 9 #include "ash/aura/wm_window_aura.h"
10 #include "ash/common/wm/mru_window_tracker.h" 10 #include "ash/common/wm/mru_window_tracker.h"
(...skipping 1109 matching lines...) Expand 10 before | Expand all | Expand 10 after
1120 TEST_F(MaximizeModeWindowManagerTest, ExitsOverview) { 1120 TEST_F(MaximizeModeWindowManagerTest, ExitsOverview) {
1121 // Bounds for windows we know can be controlled. 1121 // Bounds for windows we know can be controlled.
1122 gfx::Rect rect1(10, 10, 200, 50); 1122 gfx::Rect rect1(10, 10, 200, 50);
1123 gfx::Rect rect2(10, 60, 200, 50); 1123 gfx::Rect rect2(10, 60, 200, 50);
1124 std::unique_ptr<aura::Window> w1( 1124 std::unique_ptr<aura::Window> w1(
1125 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1)); 1125 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect1));
1126 std::unique_ptr<aura::Window> w2( 1126 std::unique_ptr<aura::Window> w2(
1127 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2)); 1127 CreateWindow(ui::wm::WINDOW_TYPE_NORMAL, rect2));
1128 1128
1129 WindowSelectorController* window_selector_controller = 1129 WindowSelectorController* window_selector_controller =
1130 Shell::GetInstance()->window_selector_controller(); 1130 WmShell::Get()->window_selector_controller();
1131 window_selector_controller->ToggleOverview(); 1131 window_selector_controller->ToggleOverview();
1132 ASSERT_TRUE(window_selector_controller->IsSelecting()); 1132 ASSERT_TRUE(window_selector_controller->IsSelecting());
1133 ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); 1133 ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
1134 ASSERT_TRUE(manager); 1134 ASSERT_TRUE(manager);
1135 EXPECT_FALSE(window_selector_controller->IsSelecting()); 1135 EXPECT_FALSE(window_selector_controller->IsSelecting());
1136 1136
1137 window_selector_controller->ToggleOverview(); 1137 window_selector_controller->ToggleOverview();
1138 ASSERT_TRUE(window_selector_controller->IsSelecting()); 1138 ASSERT_TRUE(window_selector_controller->IsSelecting());
1139 // Destroy the manager again and check that the windows return to their 1139 // Destroy the manager again and check that the windows return to their
1140 // previous state. 1140 // previous state.
(...skipping 305 matching lines...) Expand 10 before | Expand all | Expand 10 after
1446 1446
1447 ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager(); 1447 ash::MaximizeModeWindowManager* manager = CreateMaximizeModeWindowManager();
1448 EXPECT_TRUE(wm::GetWindowState(window.get())->IsDocked()); 1448 EXPECT_TRUE(wm::GetWindowState(window.get())->IsDocked());
1449 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized()); 1449 EXPECT_FALSE(wm::GetWindowState(window.get())->IsMaximized());
1450 EXPECT_EQ(0, manager->GetNumberOfManagedWindows()); 1450 EXPECT_EQ(0, manager->GetNumberOfManagedWindows());
1451 } 1451 }
1452 1452
1453 #endif // OS_WIN 1453 #endif // OS_WIN
1454 1454
1455 } // namespace ash 1455 } // namespace ash
OLDNEW
« no previous file with comments | « ash/wm/maximize_mode/maximize_mode_window_manager.cc ('k') | ash/wm/overview/window_selector_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698