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

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

Issue 1523953004: Fix volume slider to emit value changed events and do not focus system tray item for transient views (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Revise comment Created 5 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
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 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
415 "Brightness * percent")); 415 "Brightness * percent"));
416 416
417 EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_DOWN)); 417 EXPECT_TRUE(PerformAcceleratorAction(ash::BRIGHTNESS_DOWN));
418 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 418 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
419 "Brightness * percent")); 419 "Brightness * percent"));
420 } 420 }
421 421
422 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, VolumeSlider) { 422 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, VolumeSlider) {
423 EnableChromeVox(); 423 EnableChromeVox();
424 424
425 // Volume slider does not fire valueChanged event on first key press because
426 // it has no widget.
427 EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
425 EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP)); 428 EXPECT_TRUE(PerformAcceleratorAction(ash::VOLUME_UP));
426 EXPECT_TRUE( 429 EXPECT_TRUE(
427 base::MatchPattern(speech_monitor_.GetNextUtterance(), "* percent*")); 430 base::MatchPattern(speech_monitor_.GetNextUtterance(), "* percent*"));
428 EXPECT_EQ("Volume,", speech_monitor_.GetNextUtterance()); 431 EXPECT_EQ("Volume,", speech_monitor_.GetNextUtterance());
429 EXPECT_EQ("slider", speech_monitor_.GetNextUtterance()); 432 EXPECT_EQ("slider", speech_monitor_.GetNextUtterance());
430 } 433 }
431 434
432 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) { 435 IN_PROC_BROWSER_TEST_P(SpokenFeedbackTest, OverviewMode) {
433 EnableChromeVox(); 436 EnableChromeVox();
434 437
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after
693 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 696 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
694 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 697 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
695 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 698 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
696 } 699 }
697 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 700 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
698 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 701 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
699 "Combo box * of *")); 702 "Combo box * of *"));
700 } 703 }
701 704
702 } // namespace chromeos 705 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698