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

Unified Diff: talk/app/webrtc/localaudiosource_unittest.cc

Issue 1151573021: Re-land r9378 "Rename APM Config DelayCorrection to ExtendedFilter" (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: New line Created 5 years, 6 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 | « talk/app/webrtc/localaudiosource.cc ('k') | talk/app/webrtc/mediaconstraintsinterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: talk/app/webrtc/localaudiosource_unittest.cc
diff --git a/talk/app/webrtc/localaudiosource_unittest.cc b/talk/app/webrtc/localaudiosource_unittest.cc
index 569f814a52c0f817f216837076a281709a484e59..1c434203da800129ef74f6b35999fec2e6f20d26 100644
--- a/talk/app/webrtc/localaudiosource_unittest.cc
+++ b/talk/app/webrtc/localaudiosource_unittest.cc
@@ -45,7 +45,7 @@ TEST(LocalAudioSourceTest, SetValidOptions) {
webrtc::FakeConstraints constraints;
constraints.AddMandatory(MediaConstraintsInterface::kEchoCancellation, false);
constraints.AddOptional(
- MediaConstraintsInterface::kExperimentalEchoCancellation, true);
+ MediaConstraintsInterface::kExtendedFilterEchoCancellation, true);
constraints.AddOptional(MediaConstraintsInterface::kDAEchoCancellation, true);
constraints.AddOptional(MediaConstraintsInterface::kAutoGainControl, true);
constraints.AddOptional(
@@ -61,7 +61,7 @@ TEST(LocalAudioSourceTest, SetValidOptions) {
bool value;
EXPECT_TRUE(source->options().echo_cancellation.Get(&value));
EXPECT_FALSE(value);
- EXPECT_TRUE(source->options().experimental_aec.Get(&value));
+ EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
EXPECT_TRUE(value);
EXPECT_TRUE(source->options().delay_agnostic_aec.Get(&value));
EXPECT_TRUE(value);
@@ -77,6 +77,51 @@ TEST(LocalAudioSourceTest, SetValidOptions) {
EXPECT_TRUE(value);
}
+// TODO(henrik.lundin) Remove SetExtendedFilterEchoCancellationOff test.
+// https://code.google.com/p/webrtc/issues/detail?id=4696
+TEST(LocalAudioSourceTest, SetExtendedFilterEchoCancellationOff) {
+ webrtc::FakeConstraints constraints;
+ constraints.AddOptional(
+ MediaConstraintsInterface::kExtendedFilterEchoCancellation, false);
+
+ rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
+ PeerConnectionFactoryInterface::Options(), &constraints);
+
+ bool value;
+ EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
+ EXPECT_FALSE(value);
+}
+
+// TODO(henrik.lundin) Remove SetExperimentalEchoCancellationOn test.
+// https://code.google.com/p/webrtc/issues/detail?id=4696
+TEST(LocalAudioSourceTest, SetExperimentalEchoCancellationOn) {
+ webrtc::FakeConstraints constraints;
+ constraints.AddOptional(
+ MediaConstraintsInterface::kExperimentalEchoCancellation, true);
+
+ rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
+ PeerConnectionFactoryInterface::Options(), &constraints);
+
+ bool value;
+ EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
+ EXPECT_TRUE(value);
+}
+
+// TODO(henrik.lundin) Remove SetExperimentalEchoCancellationOff test.
+// https://code.google.com/p/webrtc/issues/detail?id=4696
+TEST(LocalAudioSourceTest, SetExperimentalEchoCancellationOff) {
+ webrtc::FakeConstraints constraints;
+ constraints.AddOptional(
+ MediaConstraintsInterface::kExperimentalEchoCancellation, false);
+
+ rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
+ PeerConnectionFactoryInterface::Options(), &constraints);
+
+ bool value;
+ EXPECT_TRUE(source->options().extended_filter_aec.Get(&value));
+ EXPECT_FALSE(value);
+}
+
TEST(LocalAudioSourceTest, OptionNotSet) {
webrtc::FakeConstraints constraints;
rtc::scoped_refptr<LocalAudioSource> source =
« no previous file with comments | « talk/app/webrtc/localaudiosource.cc ('k') | talk/app/webrtc/mediaconstraintsinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698