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

Unified Diff: content/renderer/media/media_stream_audio_processor_unittest.cc

Issue 816193003: Add a new audio constraint, 'googHotword', that requests the hotword input (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_options.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/media_stream_audio_processor_unittest.cc
diff --git a/content/renderer/media/media_stream_audio_processor_unittest.cc b/content/renderer/media/media_stream_audio_processor_unittest.cc
index 3ebaea2373c14c664aa81f5fb76741cca3fc42a3..1dfa2c93cfad0a2049ce3bc87ca2a3dc67172854 100644
--- a/content/renderer/media/media_stream_audio_processor_unittest.cc
+++ b/content/renderer/media/media_stream_audio_processor_unittest.cc
@@ -271,7 +271,8 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyConstraints) {
MediaAudioConstraints::kGoogExperimentalNoiseSuppression,
MediaAudioConstraints::kGoogHighpassFilter,
MediaAudioConstraints::kGoogNoiseSuppression,
- MediaAudioConstraints::kGoogTypingNoiseDetection
+ MediaAudioConstraints::kGoogTypingNoiseDetection,
+ kMediaStreamAudioHotword
};
// Verify mandatory constraints.
@@ -344,6 +345,14 @@ TEST_F(MediaStreamAudioProcessorTest, VerifyConstraints) {
EXPECT_FALSE(audio_constraints.GetProperty(kMediaStreamAudioDucking));
#endif
}
+
+ {
+ // |kMediaStreamAudioHotword| is always off by default.
+ MockMediaConstraintFactory constraint_factory;
+ MediaAudioConstraints audio_constraints(
+ constraint_factory.CreateWebMediaConstraints(), 0);
+ EXPECT_FALSE(audio_constraints.GetProperty(kMediaStreamAudioHotword));
+ }
}
TEST_F(MediaStreamAudioProcessorTest, ValidateConstraints) {
« no previous file with comments | « content/renderer/media/media_stream_audio_processor_options.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698