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

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

Issue 2008773002: Begin using ChromeVox Next to read tab and window titles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a bunch of tests. Created 4 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
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/background/tabs_api_handler.js » ('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 293 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF)); 305 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
306 if (app_list::switches::IsExperimentalAppListEnabled()) 306 if (app_list::switches::IsExperimentalAppListEnabled())
307 EXPECT_EQ("Launcher", speech_monitor_.GetNextUtterance()); 307 EXPECT_EQ("Launcher", speech_monitor_.GetNextUtterance());
308 else 308 else
309 EXPECT_EQ("Apps", speech_monitor_.GetNextUtterance()); 309 EXPECT_EQ("Apps", speech_monitor_.GetNextUtterance());
310 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 310 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
311 311
312 EXPECT_EQ("Shelf", speech_monitor_.GetNextUtterance()); 312 EXPECT_EQ("Shelf", speech_monitor_.GetNextUtterance());
313 EXPECT_EQ("Tool bar", speech_monitor_.GetNextUtterance()); 313 EXPECT_EQ("Tool bar", speech_monitor_.GetNextUtterance());
314 EXPECT_EQ(", window", speech_monitor_.GetNextUtterance());
314 315
315 SendKeyPress(ui::VKEY_TAB); 316 SendKeyPress(ui::VKEY_TAB);
316 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*")); 317 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
317 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button")); 318 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
318 } 319 }
319 320
320 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_NavigateAppLauncher) { 321 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, DISABLED_NavigateAppLauncher) {
321 EnableChromeVox(); 322 EnableChromeVox();
322 323
323 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF)); 324 EXPECT_TRUE(PerformAcceleratorAction(ash::FOCUS_SHELF));
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) { 371 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OpenStatusTray) {
371 EnableChromeVox(); 372 EnableChromeVox();
372 373
373 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE)); 374 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
374 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*")); 375 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
375 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button")); 376 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
376 EXPECT_TRUE( 377 EXPECT_TRUE(
377 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Status tray*")); 378 base::MatchPattern(speech_monitor_.GetNextUtterance(), "Status tray*"));
378 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time *")); 379 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "time *"));
379 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 380 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
380 "Battery is*full.")); 381 "Battery is*full.,"));
382 EXPECT_EQ("window", speech_monitor_.GetNextUtterance());
381 } 383 }
382 384
383 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) { 385 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, NavigateSystemTray) {
384 EnableChromeVox(); 386 EnableChromeVox();
385 387
386 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE)); 388 EXPECT_TRUE(PerformAcceleratorAction(ash::SHOW_SYSTEM_TRAY_BUBBLE));
387 while (true) { 389 while (true) {
388 std::string utterance = speech_monitor_.GetNextUtterance(); 390 std::string utterance = speech_monitor_.GetNextUtterance();
389 if (base::MatchPattern(utterance, "Battery*")) 391 if (base::MatchPattern(utterance, "window"))
390 break; 392 break;
391 } 393 }
392 394
393 SendKeyPress(ui::VKEY_TAB); 395 SendKeyPress(ui::VKEY_TAB);
394 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*")); 396 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
395 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button")); 397 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "Button"));
396 398
397 // Compat next element. 399 // Compat next element.
398 SendKeyPressWithSearchAndShift(ui::VKEY_RIGHT); 400 SendKeyPressWithSearchAndShift(ui::VKEY_RIGHT);
399 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*")); 401 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), "*"));
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
458 EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP)); 460 EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
459 EXPECT_TRUE( 461 EXPECT_TRUE(
460 base::MatchPattern(speech_monitor_.GetNextUtterance(), "* percent*")); 462 base::MatchPattern(speech_monitor_.GetNextUtterance(), "* percent*"));
461 } 463 }
462 464
463 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) { 465 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) {
464 EnableChromeVox(); 466 EnableChromeVox();
465 467
466 EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW)); 468 EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW));
467 EXPECT_EQ("Edit text", speech_monitor_.GetNextUtterance()); 469 EXPECT_EQ("Edit text", speech_monitor_.GetNextUtterance());
470 EXPECT_EQ(", window", speech_monitor_.GetNextUtterance());
468 EXPECT_EQ("Alert", speech_monitor_.GetNextUtterance()); 471 EXPECT_EQ("Alert", speech_monitor_.GetNextUtterance());
469 EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance()); 472 EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance());
470 473
471 SendKeyPress(ui::VKEY_TAB); 474 SendKeyPress(ui::VKEY_TAB);
472 EXPECT_EQ("about:blank", speech_monitor_.GetNextUtterance()); 475 EXPECT_EQ("about:blank", speech_monitor_.GetNextUtterance());
473 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 476 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
474 } 477 }
475 478
476 #if defined(MEMORY_SANITIZER) 479 #if defined(MEMORY_SANITIZER)
477 // Fails under MemorySanitizer: http://crbug.com/472125 480 // Fails under MemorySanitizer: http://crbug.com/472125
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
724 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 727 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
725 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 728 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
726 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 729 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
727 } 730 }
728 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 731 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
729 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 732 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
730 "Combo box * of *")); 733 "Combo box * of *"));
731 } 734 }
732 735
733 } // namespace chromeos 736 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/chromeos/chromevox/chromevox/background/tabs_api_handler.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698