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 #include "ash/accelerators/accelerator_table.h" | 6 #include "ash/accelerators/accelerator_table.h" |
7 #include "ash/accessibility_delegate.h" | 7 #include "ash/accessibility_delegate.h" |
8 #include "ash/ash_switches.h" | 8 #include "ash/ash_switches.h" |
9 #include "ash/display/display_manager.h" | 9 #include "ash/display/display_manager.h" |
10 #include "ash/ime_control_delegate.h" | 10 #include "ash/ime_control_delegate.h" |
(...skipping 1228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1239 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); | 1239 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1240 } | 1240 } |
1241 | 1241 |
1242 // Make sure we don't alert if we do have a window. | 1242 // Make sure we don't alert if we do have a window. |
1243 scoped_ptr<aura::Window> window( | 1243 scoped_ptr<aura::Window> window( |
1244 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); | 1244 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20))); |
1245 wm::ActivateWindow(window.get()); | 1245 wm::ActivateWindow(window.get()); |
1246 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { | 1246 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { |
1247 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); | 1247 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); |
1248 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); | 1248 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); |
1249 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE); | 1249 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1250 } | 1250 } |
1251 | 1251 |
1252 // Don't alert if we have a minimized window either. | 1252 // Don't alert if we have a minimized window either. |
1253 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); | 1253 GetController()->PerformAction(WINDOW_MINIMIZE, dummy); |
1254 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { | 1254 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { |
1255 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); | 1255 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); |
1256 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); | 1256 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); |
1257 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_NONE); | 1257 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); |
1258 } | 1258 } |
1259 } | 1259 } |
1260 | 1260 |
1261 } // namespace ash | 1261 } // namespace ash |
OLD | NEW |