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

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

Issue 1191783002: Support Compat mode inside of the desktop tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commands_alt
Patch Set: Rebase. Created 5 years, 6 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
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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after
348 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) { 348 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) {
349 EnableChromeVox(); 349 EnableChromeVox();
350 350
351 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE)); 351 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
352 while (true) { 352 while (true) {
353 std::string utterance = speech_monitor_.GetNextUtterance(); 353 std::string utterance = speech_monitor_.GetNextUtterance();
354 if (MatchPattern(utterance, "Button")) 354 if (MatchPattern(utterance, "Button"))
355 break; 355 break;
356 } 356 }
357 357
358 SendKeyPress(ui::VKEY_TAB);
359 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
360 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
361
362 // Compat next element.
363 SendKeyPressWithSearchAndShift(ui::VKEY_RIGHT);
364 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
365 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
366
367 // Compat next button.
368 SendKeyPressWithSearchAndShift(ui::VKEY_N);
369 SendKeyPressWithSearchAndShift(ui::VKEY_B);
370 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
371 EXPECT_TRUE(MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
372
358 // Navigate to Bluetooth sub-menu and open it. 373 // Navigate to Bluetooth sub-menu and open it.
359 while (true) { 374 while (true) {
360 SendKeyPress(ui::VKEY_TAB); 375 SendKeyPress(ui::VKEY_TAB);
361 std::string content = speech_monitor_.GetNextUtterance(); 376 std::string content = speech_monitor_.GetNextUtterance();
362 std::string role = speech_monitor_.GetNextUtterance(); 377 std::string role = speech_monitor_.GetNextUtterance();
363 if (MatchPattern(content, "*Bluetooth*") && MatchPattern(role, "Button")) 378 if (MatchPattern(content, "*Bluetooth*") && MatchPattern(role, "Button"))
364 break; 379 break;
365 } 380 }
366 SendKeyPress(ui::VKEY_RETURN); 381 SendKeyPress(ui::VKEY_RETURN);
367 382
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 656 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
642 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 657 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
643 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 658 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
644 } 659 }
645 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 660 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
646 EXPECT_TRUE( 661 EXPECT_TRUE(
647 MatchPattern(speech_monitor_.GetNextUtterance(), "Combo box * of *")); 662 MatchPattern(speech_monitor_.GetNextUtterance(), "Combo box * of *"));
648 } 663 }
649 664
650 } // namespace chromeos 665 } // namespace chromeos
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_table.cc ('k') | chrome/browser/resources/chromeos/chromevox/cvox2/background/background.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698