| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 <algorithm> | 5 #include <algorithm> |
| 6 #include <vector> | 6 #include <vector> |
| 7 | 7 |
| 8 #include "ash/aura/wm_window_aura.h" | 8 #include "ash/aura/wm_window_aura.h" |
| 9 #include "ash/common/accessibility_delegate.h" | 9 #include "ash/common/accessibility_delegate.h" |
| 10 #include "ash/common/accessibility_types.h" | 10 #include "ash/common/accessibility_types.h" |
| (...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1155 | 1155 |
| 1156 // Entering overview and selecting another window, the previous window remains | 1156 // Entering overview and selecting another window, the previous window remains |
| 1157 // fullscreen. | 1157 // fullscreen. |
| 1158 // TODO(flackr): Currently the panel remains hidden, but should become visible | 1158 // TODO(flackr): Currently the panel remains hidden, but should become visible |
| 1159 // again. | 1159 // again. |
| 1160 ToggleOverview(); | 1160 ToggleOverview(); |
| 1161 ClickWindow(window2.get()); | 1161 ClickWindow(window2.get()); |
| 1162 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); | 1162 EXPECT_TRUE(wm::GetWindowState(window1.get())->IsFullscreen()); |
| 1163 } | 1163 } |
| 1164 | 1164 |
| 1165 // Tests that the shelf dimming state is removed while in overview and restored | |
| 1166 // on exiting overview. | |
| 1167 TEST_F(WindowSelectorTest, OverviewUndimsShelf) { | |
| 1168 gfx::Rect bounds(0, 0, 400, 400); | |
| 1169 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | |
| 1170 wm::WindowState* window_state = wm::GetWindowState(window1.get()); | |
| 1171 window_state->Maximize(); | |
| 1172 ShelfWidget* shelf = GetPrimaryShelf()->shelf_widget(); | |
| 1173 EXPECT_TRUE(shelf->GetDimsShelf()); | |
| 1174 ToggleOverview(); | |
| 1175 EXPECT_FALSE(shelf->GetDimsShelf()); | |
| 1176 ToggleOverview(); | |
| 1177 EXPECT_TRUE(shelf->GetDimsShelf()); | |
| 1178 } | |
| 1179 | |
| 1180 // Tests that entering overview when a fullscreen window is active in maximized | 1165 // Tests that entering overview when a fullscreen window is active in maximized |
| 1181 // mode correctly applies the transformations to the window and correctly | 1166 // mode correctly applies the transformations to the window and correctly |
| 1182 // updates the window bounds on exiting overview mode: http://crbug.com/401664. | 1167 // updates the window bounds on exiting overview mode: http://crbug.com/401664. |
| 1183 TEST_F(WindowSelectorTest, FullscreenWindowMaximizeMode) { | 1168 TEST_F(WindowSelectorTest, FullscreenWindowMaximizeMode) { |
| 1184 gfx::Rect bounds(0, 0, 400, 400); | 1169 gfx::Rect bounds(0, 0, 400, 400); |
| 1185 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 1170 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 1186 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); | 1171 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); |
| 1187 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( | 1172 WmShell::Get()->maximize_mode_controller()->EnableMaximizeModeWindowManager( |
| 1188 true); | 1173 true); |
| 1189 wm::ActivateWindow(window2.get()); | 1174 wm::ActivateWindow(window2.get()); |
| (...skipping 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2137 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 2122 HTCAPTION, aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 2138 ASSERT_TRUE(resizer.get()); | 2123 ASSERT_TRUE(resizer.get()); |
| 2139 gfx::Point location = resizer->GetInitialLocation(); | 2124 gfx::Point location = resizer->GetInitialLocation(); |
| 2140 location.Offset(20, 20); | 2125 location.Offset(20, 20); |
| 2141 resizer->Drag(location, 0); | 2126 resizer->Drag(location, 0); |
| 2142 ToggleOverview(); | 2127 ToggleOverview(); |
| 2143 resizer->RevertDrag(); | 2128 resizer->RevertDrag(); |
| 2144 } | 2129 } |
| 2145 | 2130 |
| 2146 } // namespace ash | 2131 } // namespace ash |
| OLD | NEW |