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

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: Review comments 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
« no previous file with comments | « webrtc/api/localaudiosource.cc ('k') | webrtc/api/mediaconstraintsinterface.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/api/localaudiosource_unittest.cc
diff --git a/webrtc/api/localaudiosource_unittest.cc b/webrtc/api/localaudiosource_unittest.cc
index 1abb940414f9c1236419e924082de1138cf448df..12f46b79f9c218e7dbd7999180274f437dd25342 100644
--- a/webrtc/api/localaudiosource_unittest.cc
+++ b/webrtc/api/localaudiosource_unittest.cc
@@ -96,3 +96,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);
+}
« no previous file with comments | « webrtc/api/localaudiosource.cc ('k') | webrtc/api/mediaconstraintsinterface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698