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

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

Issue 1577973002: Merge to m48: Fix volume slider to emit value changed events and do not focus system tray it\ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@2564
Patch Set: Created 4 years, 11 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 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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync( 672 ASSERT_TRUE(ui_test_utils::SendKeyPressToWindowSync(
670 window, ui::VKEY_TAB, false, true /*shift*/, false, false)); 673 window, ui::VKEY_TAB, false, true /*shift*/, false, false));
671 while (speech_monitor_.GetNextUtterance() != "Select your language:") { 674 while (speech_monitor_.GetNextUtterance() != "Select your language:") {
672 } 675 }
673 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance()); 676 EXPECT_EQ("English ( United States)", speech_monitor_.GetNextUtterance());
674 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(), 677 EXPECT_TRUE(base::MatchPattern(speech_monitor_.GetNextUtterance(),
675 "Combo box * of *")); 678 "Combo box * of *"));
676 } 679 }
677 680
678 } // namespace chromeos 681 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698