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

Unified Diff: chrome/browser/chromeos/accessibility/speech_monitor.cc

Issue 2449043004: Explicitly skip notification announcements in SpokenFeedbackTest (Closed)
Patch Set: Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/accessibility/speech_monitor.cc
diff --git a/chrome/browser/chromeos/accessibility/speech_monitor.cc b/chrome/browser/chromeos/accessibility/speech_monitor.cc
index 1d1c0642aa0716585109901ff847aaa3ccbffa4d..9d83fa54fff7ae41a703d5d56c8a90df40c0827e 100644
--- a/chrome/browser/chromeos/accessibility/speech_monitor.cc
+++ b/chrome/browser/chromeos/accessibility/speech_monitor.cc
@@ -8,6 +8,9 @@ namespace chromeos {
namespace {
const char kChromeVoxEnabledMessage[] = "chrome vox spoken feedback is ready";
+const char kChromeVoxAlertMessage[] = "Alert";
+const char kChromeVoxUpdate1[] = "chrome vox Updated Press chrome vox o,";
+const char kChromeVoxUpdate2[] = "n to learn more about chrome vox Next.";
} // namespace
SpeechMonitor::SpeechMonitor() {
@@ -88,9 +91,12 @@ std::string SpeechMonitor::error() {
void SpeechMonitor::WillSpeakUtteranceWithVoice(const Utterance* utterance,
const VoiceData& voice_data) {
+ // Blacklist some phrases.
// Filter out empty utterances which can be used to trigger a start event from
// tts as an earcon sync.
- if (utterance->text() == "")
+ if (utterance->text() == "" || utterance->text() == kChromeVoxAlertMessage ||
+ utterance->text() == kChromeVoxUpdate1 ||
+ utterance->text() == kChromeVoxUpdate2)
return;
VLOG(0) << "Speaking " << utterance->text();
« no previous file with comments | « no previous file | chrome/browser/chromeos/accessibility/spoken_feedback_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698