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

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

Issue 2530073002: Add kAccessibilityFocusFallsbackToWidget property (Closed)
Patch Set: Fix a nit Created 4 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 | components/exo/shell_surface.cc » ('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/common/accelerators/accelerator_controller.h" 7 #include "ash/common/accelerators/accelerator_controller.h"
8 #include "ash/common/accelerators/accelerator_table.h" 8 #include "ash/common/accelerators/accelerator_table.h"
9 #include "ash/common/accessibility_types.h" 9 #include "ash/common/accessibility_types.h"
10 #include "ash/common/material_design/material_design_controller.h" 10 #include "ash/common/material_design/material_design_controller.h"
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) { 493 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) {
494 EnableChromeVox(); 494 EnableChromeVox();
495 495
496 EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW)); 496 EXPECT_TRUE(PerformAcceleratorAction(ash::TOGGLE_OVERVIEW));
497 while (true) { 497 while (true) {
498 std::string utterance = speech_monitor_.GetNextUtterance(); 498 std::string utterance = speech_monitor_.GetNextUtterance();
499 if (base::MatchPattern(utterance, "Edit text")) 499 if (base::MatchPattern(utterance, "Edit text"))
500 break; 500 break;
501 } 501 }
502 502
503 EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance()); 503 while (true) {
504 std::string utterance = speech_monitor_.GetNextUtterance();
505 if (utterance == "Entered window overview mode")
506 break;
507 }
504 508
505 SendKeyPress(ui::VKEY_TAB); 509 SendKeyPress(ui::VKEY_TAB);
506 // On Chrome OS accessibility title for tabbed browser windows contains app 510 // On Chrome OS accessibility title for tabbed browser windows contains app
507 // name ("Chrome" or "Chromium") in overview mode. 511 // name ("Chrome" or "Chromium") in overview mode.
508 while (true) { 512 while (true) {
509 std::string utterance = speech_monitor_.GetNextUtterance(); 513 std::string utterance = speech_monitor_.GetNextUtterance();
510 if (base::MatchPattern(utterance, "Chromium - about:blank")) 514 if (base::MatchPattern(utterance, "Chromium - about:blank"))
511 break; 515 break;
512 } 516 }
513 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 517 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
(...skipping 13 matching lines...) Expand all
527 GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>")); 531 GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>"));
528 while (true) { 532 while (true) {
529 std::string utterance = speech_monitor_.GetNextUtterance(); 533 std::string utterance = speech_monitor_.GetNextUtterance();
530 if (utterance == "Click me") 534 if (utterance == "Click me")
531 break; 535 break;
532 } 536 }
533 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 537 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
534 538
535 // Press Search+/ to enter ChromeVox's "find in page". 539 // Press Search+/ to enter ChromeVox's "find in page".
536 SendKeyPressWithSearch(ui::VKEY_OEM_2); 540 SendKeyPressWithSearch(ui::VKEY_OEM_2);
537 EXPECT_EQ(", window", speech_monitor_.GetNextUtterance()); 541
538 EXPECT_EQ("webView", speech_monitor_.GetNextUtterance()); 542 while (true) {
539 EXPECT_EQ("Find in page.", speech_monitor_.GetNextUtterance()); 543 std::string utterance = speech_monitor_.GetNextUtterance();
544 if (utterance == "Find in page.")
545 break;
546 }
540 } 547 }
541 548
542 #if defined(MEMORY_SANITIZER) 549 #if defined(MEMORY_SANITIZER)
543 // Fails under MemorySanitizer: http://crbug.com/472125 550 // Fails under MemorySanitizer: http://crbug.com/472125
544 #define MAYBE_ChromeVoxNavigateAndSelect DISABLED_ChromeVoxNavigateAndSelect 551 #define MAYBE_ChromeVoxNavigateAndSelect DISABLED_ChromeVoxNavigateAndSelect
545 #else 552 #else
546 #define MAYBE_ChromeVoxNavigateAndSelect ChromeVoxNavigateAndSelect 553 #define MAYBE_ChromeVoxNavigateAndSelect ChromeVoxNavigateAndSelect
547 #endif 554 #endif
548 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxNavigateAndSelect) { 555 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxNavigateAndSelect) {
549 EnableChromeVox(); 556 EnableChromeVox();
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 763 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
757 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 764 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
758 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 765 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
759 } 766 }
760 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 767 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
761 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 768 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
762 "Combo box * of *")); 769 "Combo box * of *"));
763 } 770 }
764 771
765 } // namespace chromeos 772 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | components/exo/shell_surface.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698