| 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 1195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1206 ClickWindow(window2.get()); | 1206 ClickWindow(window2.get()); |
| 1207 EXPECT_EQ(normal_window_bounds.ToString(), | 1207 EXPECT_EQ(normal_window_bounds.ToString(), |
| 1208 window2->GetTargetBounds().ToString()); | 1208 window2->GetTargetBounds().ToString()); |
| 1209 } | 1209 } |
| 1210 | 1210 |
| 1211 // Tests that beginning window selection hides the app list. | 1211 // Tests that beginning window selection hides the app list. |
| 1212 TEST_P(WindowSelectorTest, SelectingHidesAppList) { | 1212 TEST_P(WindowSelectorTest, SelectingHidesAppList) { |
| 1213 gfx::Rect bounds(0, 0, 400, 400); | 1213 gfx::Rect bounds(0, 0, 400, 400); |
| 1214 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 1214 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 1215 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); | 1215 std::unique_ptr<aura::Window> window2(CreateWindow(bounds)); |
| 1216 Shell::GetInstance()->ShowAppList(nullptr); | 1216 WmShell::Get()->ShowAppList(); |
| 1217 EXPECT_TRUE(Shell::GetInstance()->GetAppListTargetVisibility()); | 1217 EXPECT_TRUE(WmShell::Get()->GetAppListTargetVisibility()); |
| 1218 ToggleOverview(); | 1218 ToggleOverview(); |
| 1219 EXPECT_FALSE(Shell::GetInstance()->GetAppListTargetVisibility()); | 1219 EXPECT_FALSE(WmShell::Get()->GetAppListTargetVisibility()); |
| 1220 ToggleOverview(); | 1220 ToggleOverview(); |
| 1221 } | 1221 } |
| 1222 | 1222 |
| 1223 // Tests that a minimized window's visibility and layer visibility is correctly | 1223 // Tests that a minimized window's visibility and layer visibility is correctly |
| 1224 // changed when entering overview and restored when leaving overview mode. | 1224 // changed when entering overview and restored when leaving overview mode. |
| 1225 // Crashes after the skia roll in http://crrev.com/274114. | 1225 // Crashes after the skia roll in http://crrev.com/274114. |
| 1226 // http://crbug.com/379570 | 1226 // http://crbug.com/379570 |
| 1227 TEST_P(WindowSelectorTest, DISABLED_MinimizedWindowVisibility) { | 1227 TEST_P(WindowSelectorTest, DISABLED_MinimizedWindowVisibility) { |
| 1228 gfx::Rect bounds(0, 0, 400, 400); | 1228 gfx::Rect bounds(0, 0, 400, 400); |
| 1229 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 1229 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| (...skipping 835 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2065 bounds.y()); | 2065 bounds.y()); |
| 2066 EXPECT_LE(transformed_rect.bottom(), bounds.bottom()); | 2066 EXPECT_LE(transformed_rect.bottom(), bounds.bottom()); |
| 2067 EXPECT_NEAR(transformed_rect.x() - bounds.x(), | 2067 EXPECT_NEAR(transformed_rect.x() - bounds.x(), |
| 2068 bounds.right() - transformed_rect.right(), 1); | 2068 bounds.right() - transformed_rect.right(), 1); |
| 2069 EXPECT_NEAR( | 2069 EXPECT_NEAR( |
| 2070 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), | 2070 transformed_rect.y() + (int)(scale * inset) - header_height - bounds.y(), |
| 2071 bounds.bottom() - transformed_rect.bottom(), 1); | 2071 bounds.bottom() - transformed_rect.bottom(), 1); |
| 2072 } | 2072 } |
| 2073 | 2073 |
| 2074 } // namespace ash | 2074 } // namespace ash |
| OLD | NEW |