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

Unified Diff: webrtc/api/localaudiosource_unittest.cc

Issue 1717583002: Non-constraint interfaces for all constrainable interfaces (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Fix an ambiguous function Created 4 years, 10 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
Index: webrtc/api/localaudiosource_unittest.cc
diff --git a/webrtc/api/localaudiosource_unittest.cc b/webrtc/api/localaudiosource_unittest.cc
index fad78d9a91ddd6ac3c077eec94ee78a492819003..62396099c17b6ad110176873dc0d475bc0819d07 100644
--- a/webrtc/api/localaudiosource_unittest.cc
+++ b/webrtc/api/localaudiosource_unittest.cc
@@ -98,3 +98,18 @@ TEST(LocalAudioSourceTest, InvalidMandatory) {
EXPECT_EQ(MediaSourceInterface::kLive, source->state());
EXPECT_EQ(rtc::Optional<bool>(false), source->options().highpass_filter);
}
+
+TEST(LocalAudioSourceTest, InitWithAudioOptions) {
+ cricket::AudioOptions audio_options;
+ audio_options.highpass_filter = rtc::Optional<bool>(true);
+ rtc::scoped_refptr<LocalAudioSource> source = LocalAudioSource::Create(
+ PeerConnectionFactoryInterface::Options(), &audio_options);
+ EXPECT_EQ(rtc::Optional<bool>(true), source->options().highpass_filter);
+}
+
+TEST(LocalAudioSourceTest, InitWithNoOptions) {
+ rtc::scoped_refptr<LocalAudioSource> source =
+ LocalAudioSource::Create(PeerConnectionFactoryInterface::Options(),
+ (cricket::AudioOptions*)nullptr);
+ EXPECT_EQ(rtc::Optional<bool>(), source->options().highpass_filter);
+}

Powered by Google App Engine
This is Rietveld 408576698