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

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

Issue 1213513003: Revert of Support Compat mode inside of the desktop tree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@commands_alt
Patch Set: Created 5 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
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
373 // Navigate to Bluetooth sub-menu and open it. 358 // Navigate to Bluetooth sub-menu and open it.
374 while (true) { 359 while (true) {
375 SendKeyPress(ui::VKEY_TAB); 360 SendKeyPress(ui::VKEY_TAB);
376 std::string content = speech_monitor_.GetNextUtterance(); 361 std::string content = speech_monitor_.GetNextUtterance();
377 std::string role = speech_monitor_.GetNextUtterance(); 362 std::string role = speech_monitor_.GetNextUtterance();
378 if (MatchPattern(content, "*Bluetooth*") && MatchPattern(role, "Button")) 363 if (MatchPattern(content, "*Bluetooth*") && MatchPattern(role, "Button"))
379 break; 364 break;
380 } 365 }
381 SendKeyPress(ui::VKEY_RETURN); 366 SendKeyPress(ui::VKEY_RETURN);
382 367
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 641 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
657 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 642 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
658 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 643 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
659 } 644 }
660 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 645 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
661 EXPECT_TRUE( 646 EXPECT_TRUE(
662 MatchPattern(speech_monitor_.GetNextUtterance(), "Combo box * of *")); 647 MatchPattern(speech_monitor_.GetNextUtterance(), "Combo box * of *"));
663 } 648 }
664 649
665 } // namespace chromeos 650 } // 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