Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(584)

Side by Side Diff: ash/accelerators/accelerator_controller_unittest.cc

Issue 358553004: Added text filtering to Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed unittest Created 6 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | ash/ash_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1212 matching lines...) Expand 10 before | Expand all | Expand 10 after
1223 ash::Shell::GetInstance()->accessibility_delegate(); 1223 ash::Shell::GetInstance()->accessibility_delegate();
1224 1224
1225 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { 1225 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
1226 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); 1226 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
1227 EXPECT_TRUE( 1227 EXPECT_TRUE(
1228 GetController()->PerformAction(kActionsNeedingWindow[i], dummy)); 1228 GetController()->PerformAction(kActionsNeedingWindow[i], dummy));
1229 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); 1229 EXPECT_EQ(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED);
1230 } 1230 }
1231 1231
1232 // Make sure we don't alert if we do have a window. 1232 // Make sure we don't alert if we do have a window.
1233 scoped_ptr<aura::Window> window( 1233 scoped_ptr<aura::Window> window;
1234 CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
1235 wm::ActivateWindow(window.get());
1236 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { 1234 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
1235 window.reset(CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
Nina 2014/07/04 20:51:10 This is to avoid calling "minimize" on a window i
oshima 2014/07/07 23:30:57 Requesting minimize in overview mode should not ca
1236 wm::ActivateWindow(window.get());
1237 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); 1237 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
1238 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); 1238 GetController()->PerformAction(kActionsNeedingWindow[i], dummy);
1239 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); 1239 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED);
1240 } 1240 }
1241 1241
1242 // Don't alert if we have a minimized window either. 1242 // Don't alert if we have a minimized window either.
1243 GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
1244 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) { 1243 for (size_t i = 0; i < kActionsNeedingWindowLength; ++i) {
1244 window.reset(CreateTestWindowInShellWithBounds(gfx::Rect(5, 5, 20, 20)));
1245 wm::ActivateWindow(window.get());
1246 GetController()->PerformAction(WINDOW_MINIMIZE, dummy);
1245 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE); 1247 delegate->TriggerAccessibilityAlert(A11Y_ALERT_NONE);
1246 GetController()->PerformAction(kActionsNeedingWindow[i], dummy); 1248 GetController()->PerformAction(kActionsNeedingWindow[i], dummy);
1247 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED); 1249 EXPECT_NE(delegate->GetLastAccessibilityAlert(), A11Y_ALERT_WINDOW_NEEDED);
1248 } 1250 }
1249 } 1251 }
1250 1252
1251 } // namespace ash 1253 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/ash_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698