OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/accelerators/accelerator_controller.h" | 5 #include "ash/accelerators/accelerator_controller.h" |
6 | 6 |
7 #include "ash/accelerators/accelerator_table.h" | 7 #include "ash/accelerators/accelerator_table.h" |
8 #include "ash/accessibility_delegate.h" | 8 #include "ash/accessibility_delegate.h" |
9 #include "ash/ash_switches.h" | 9 #include "ash/ash_switches.h" |
10 #include "ash/display/display_manager.h" | 10 #include "ash/display/display_manager.h" |
(...skipping 1181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1192 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); | 1192 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1193 } | 1193 } |
1194 | 1194 |
1195 // Make sure we don't alert if we do have a window. | 1195 // Make sure we don't alert if we do have a window. |
1196 scoped_ptr<aura::Window> window( | 1196 scoped_ptr<aura::Window> window( |
1197 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); | 1197 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); |
1198 wm::ActivateWindow(window.get()); | 1198 wm::ActivateWindow(window.get()); |
1199 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { | 1199 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { |
1200 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); | 1200 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); |
1201 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); | 1201 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); |
1202 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE); | 1202 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1203 } | 1203 } |
1204 | 1204 |
1205 // Don't alert if we have a minimized window either. | 1205 // Don't alert if we have a minimized window either. |
1206 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); | 1206 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); |
1207 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { | 1207 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { |
1208 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); | 1208 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); |
1209 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); | 1209 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); |
1210 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE); | 1210 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1211 } | 1211 } |
1212 } | 1212 } |
1213 | 1213 |
1214 } // namespace ash | 1214 } // namespace ash |
OLD | NEW |