| 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/common/accessibility_delegate.h" | 8 #include "ash/common/accessibility_delegate.h" |
| 9 #include "ash/common/accessibility_types.h" | 9 #include "ash/common/accessibility_types.h" |
| 10 #include "ash/common/ash_switches.h" | 10 #include "ash/common/ash_switches.h" |
| (...skipping 387 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 398 | 398 |
| 399 // Uses the same formulas as above using width = 300, height = 400. | 399 // Uses the same formulas as above using width = 300, height = 400. |
| 400 expected_bounds = gfx::Rect(10, -42, 280, 40); | 400 expected_bounds = gfx::Rect(10, -42, 280, 40); |
| 401 EXPECT_EQ(expected_bounds.ToString(), | 401 EXPECT_EQ(expected_bounds.ToString(), |
| 402 text_filter->GetClientAreaBoundsInScreen().ToString()); | 402 text_filter->GetClientAreaBoundsInScreen().ToString()); |
| 403 } | 403 } |
| 404 | 404 |
| 405 // Tests that an a11y alert is sent on entering overview mode. | 405 // Tests that an a11y alert is sent on entering overview mode. |
| 406 TEST_F(WindowSelectorTest, A11yAlertOnOverviewMode) { | 406 TEST_F(WindowSelectorTest, A11yAlertOnOverviewMode) { |
| 407 gfx::Rect bounds(0, 0, 400, 400); | 407 gfx::Rect bounds(0, 0, 400, 400); |
| 408 AccessibilityDelegate* delegate = WmShell::Get()->accessibility_delegate(); | 408 AccessibilityDelegate* delegate = |
| 409 Shell::GetInstance()->accessibility_delegate(); |
| 409 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); | 410 std::unique_ptr<aura::Window> window1(CreateWindow(bounds)); |
| 410 EXPECT_NE(delegate->GetLastAccessibilityAlert(), | 411 EXPECT_NE(delegate->GetLastAccessibilityAlert(), |
| 411 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); | 412 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); |
| 412 ToggleOverview(); | 413 ToggleOverview(); |
| 413 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), | 414 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), |
| 414 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); | 415 A11Y_ALERT_WINDOW_OVERVIEW_MODE_ENTERED); |
| 415 } | 416 } |
| 416 | 417 |
| 417 // Tests that there are no crashes when there is not enough screen space | 418 // Tests that there are no crashes when there is not enough screen space |
| 418 // available to show all of the windows. | 419 // available to show all of the windows. |
| (...skipping 1744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2163 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); | 2164 aura::client::WINDOW_MOVE_SOURCE_MOUSE)); |
| 2164 ASSERT_TRUE(resizer.get()); | 2165 ASSERT_TRUE(resizer.get()); |
| 2165 gfx::Point location = resizer->GetInitialLocation(); | 2166 gfx::Point location = resizer->GetInitialLocation(); |
| 2166 location.Offset(20, 20); | 2167 location.Offset(20, 20); |
| 2167 resizer->Drag(location, 0); | 2168 resizer->Drag(location, 0); |
| 2168 ToggleOverview(); | 2169 ToggleOverview(); |
| 2169 resizer->RevertDrag(); | 2170 resizer->RevertDrag(); |
| 2170 } | 2171 } |
| 2171 | 2172 |
| 2172 } // namespace ash | 2173 } // namespace ash |
| OLD | NEW |