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

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

Issue 2530073002: Add kAccessibilityFocusFallsbackToWidget property (Closed)
Patch Set: Change test cases 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 | ui/views/accessibility/ax_aura_obj_cache.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(", window", speech_monitor_.GetNextUtterance());
dmazzoni 2016/11/29 17:50:17 Instead of adding this expectation, which may just
yawano 2016/11/30 10:55:54 Done.
503 EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance()); 504 EXPECT_EQ("Entered window overview mode", speech_monitor_.GetNextUtterance());
504 505
505 SendKeyPress(ui::VKEY_TAB); 506 SendKeyPress(ui::VKEY_TAB);
506 // On Chrome OS accessibility title for tabbed browser windows contains app 507 // On Chrome OS accessibility title for tabbed browser windows contains app
507 // name ("Chrome" or "Chromium") in overview mode. 508 // name ("Chrome" or "Chromium") in overview mode.
508 while (true) { 509 while (true) {
509 std::string utterance = speech_monitor_.GetNextUtterance(); 510 std::string utterance = speech_monitor_.GetNextUtterance();
510 if (base::MatchPattern(utterance, "Chromium - about:blank")) 511 if (base::MatchPattern(utterance, "Chromium - about:blank"))
511 break; 512 break;
512 } 513 }
(...skipping 14 matching lines...) Expand all
527 GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>")); 528 GURL("data:text/html;charset=utf-8,<button autofocus>Click me</button>"));
528 while (true) { 529 while (true) {
529 std::string utterance = speech_monitor_.GetNextUtterance(); 530 std::string utterance = speech_monitor_.GetNextUtterance();
530 if (utterance == "Click me") 531 if (utterance == "Click me")
531 break; 532 break;
532 } 533 }
533 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance()); 534 EXPECT_EQ("Button", speech_monitor_.GetNextUtterance());
534 535
535 // Press Search+/ to enter ChromeVox's "find in page". 536 // Press Search+/ to enter ChromeVox's "find in page".
536 SendKeyPressWithSearch(ui::VKEY_OEM_2); 537 SendKeyPressWithSearch(ui::VKEY_OEM_2);
538 EXPECT_EQ("webView", speech_monitor_.GetNextUtterance());
dmazzoni 2016/11/29 17:50:17 Same, let's get rid of this expectation and just l
yawano 2016/11/30 10:55:54 Done.
537 EXPECT_EQ(", window", speech_monitor_.GetNextUtterance()); 539 EXPECT_EQ(", window", speech_monitor_.GetNextUtterance());
538 EXPECT_EQ("webView", speech_monitor_.GetNextUtterance());
539 EXPECT_EQ("Find in page.", speech_monitor_.GetNextUtterance()); 540 EXPECT_EQ("Find in page.", speech_monitor_.GetNextUtterance());
540 } 541 }
541 542
542 #if defined(MEMORY_SANITIZER) 543 #if defined(MEMORY_SANITIZER)
543 // Fails under MemorySanitizer: http://crbug.com/472125 544 // Fails under MemorySanitizer: http://crbug.com/472125
544 #define MAYBE_ChromeVoxNavigateAndSelect DISABLED_ChromeVoxNavigateAndSelect 545 #define MAYBE_ChromeVoxNavigateAndSelect DISABLED_ChromeVoxNavigateAndSelect
545 #else 546 #else
546 #define MAYBE_ChromeVoxNavigateAndSelect ChromeVoxNavigateAndSelect 547 #define MAYBE_ChromeVoxNavigateAndSelect ChromeVoxNavigateAndSelect
547 #endif 548 #endif
548 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxNavigateAndSelect) { 549 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, MAYBE_ChromeVoxNavigateAndSelect) {
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
756 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 757 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
757 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 758 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
758 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 759 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
759 } 760 }
760 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 761 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
761 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 762 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
762 "Combo box * of *")); 763 "Combo box * of *"));
763 } 764 }
764 765
765 } // namespace chromeos 766 } // namespace chromeos
OLDNEW
« no previous file with comments | « no previous file | ui/views/accessibility/ax_aura_obj_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698