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

Side by Side Diff: chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc

Issue 770813004: Make app list search box into a Widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@matt_remove_dummy_search_box
Patch Set: addTODO Created 6 years 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 | ui/app_list/views/app_list_view.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <queue> 5 #include <queue>
6 6
7 #include "ash/accelerators/accelerator_controller.h" 7 #include "ash/accelerators/accelerator_controller.h"
8 #include "ash/accelerators/accelerator_table.h" 8 #include "ash/accelerators/accelerator_table.h"
9 #include "ash/shell.h" 9 #include "ash/shell.h"
10 #include "ash/system/tray/system_tray.h" 10 #include "ash/system/tray/system_tray.h"
(...skipping 298 matching lines...) Expand 10 before | Expand all | Expand 10 after
309 EnableChromeVox(); 309 EnableChromeVox();
310 310
311 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF)); 311 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
312 while (true) { 312 while (true) {
313 std::string utterance = speech_monitor_.GetNextUtterance(); 313 std::string utterance = speech_monitor_.GetNextUtterance();
314 if (utterance == "button") 314 if (utterance == "button")
315 break; 315 break;
316 } 316 }
317 317
318 SendKeyPress(ui::VKEY_RETURN); 318 SendKeyPress(ui::VKEY_RETURN);
319 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Chrom*,")); 319 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), ", text box"));
320 EXPECT_EQ("text box", speech_monitor_.GetNextUtterance());
321 320
322 SendKeyPress(ui::VKEY_DOWN); 321 SendKeyPress(ui::VKEY_DOWN);
323 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*, button")); 322 // Chrom* appears twice because the accessibility system uses the first app as
323 // the accessibility context.
324 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Chrom*,"));
325 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Chrom*,"));
326 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "button"));
324 } 327 }
325 328
326 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) { 329 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) {
327 EnableChromeVox(); 330 EnableChromeVox();
328 331
329 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE)); 332 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
330 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance()); 333 EXPECT_EQ("Status tray,", speech_monitor_.GetNextUtterance());
331 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "time *")); 334 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "time *"));
332 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), 335 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
333 "Battery is*full.")); 336 "Battery is*full."));
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
594 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 597 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
595 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), 598 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(),
596 "Combo box * of *")); 599 "Combo box * of *"));
597 ASSERT_TRUE( 600 ASSERT_TRUE(
598 ui_test_utils::SendKeyPressToWindowSync( 601 ui_test_utils::SendKeyPressToWindowSync(
599 window, ui::VKEY_TAB, false, false, false, false)); 602 window, ui::VKEY_TAB, false, false, false, false));
600 EXPECT_EQ("Select your keyboard:", speech_monitor_.GetNextUtterance()); 603 EXPECT_EQ("Select your keyboard:", speech_monitor_.GetNextUtterance());
601 } 604 }
602 605
603 } // namespace chromeos 606 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/app_list_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698