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); |
+} |