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

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

Issue 227743004: Added a kEchoCancellation constraint to turn off the audio processing. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: addressed the comments. Created 6 years, 8 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: content/renderer/media/webrtc_local_audio_track_unittest.cc
diff --git a/content/renderer/media/webrtc_local_audio_track_unittest.cc b/content/renderer/media/webrtc_local_audio_track_unittest.cc
index a30786bf1c7e82c2988e501fc28365ed399af749..dd0883aa76ced7e3ab6ea7f8c0d03c2781a90e0b 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -169,11 +169,11 @@ class WebRtcLocalAudioTrackTest : public ::testing::Test {
virtual void SetUp() OVERRIDE {
params_.Reset(media::AudioParameters::AUDIO_PCM_LOW_LATENCY,
media::CHANNEL_LAYOUT_STEREO, 2, 0, 48000, 16, 480);
- blink::WebMediaConstraints constraints;
+ MockMediaConstraintFactory constraint_factory;
StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
std::string(), std::string());
- capturer_ = WebRtcAudioCapturer::CreateCapturer(-1, device,
- constraints, NULL);
+ capturer_ = WebRtcAudioCapturer::CreateCapturer(
+ -1, device, constraint_factory.CreateWebMediaConstraints(), NULL);
capturer_source_ = new MockCapturerSource(capturer_.get());
EXPECT_CALL(*capturer_source_.get(), OnInitialize(_, capturer_.get(), -1))
.WillOnce(Return());
@@ -427,11 +427,12 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
track_1->AddSink(sink_1.get());
// Create a new capturer with new source with different audio format.
- blink::WebMediaConstraints constraints;
+ MockMediaConstraintFactory constraint_factory;
StreamDeviceInfo device(MEDIA_DEVICE_AUDIO_CAPTURE,
std::string(), std::string());
scoped_refptr<WebRtcAudioCapturer> new_capturer(
- WebRtcAudioCapturer::CreateCapturer(-1, device, constraints, NULL));
+ WebRtcAudioCapturer::CreateCapturer(
+ -1, device, constraint_factory.CreateWebMediaConstraints(), NULL));
scoped_refptr<MockCapturerSource> new_source(
new MockCapturerSource(new_capturer.get()));
EXPECT_CALL(*new_source.get(), OnInitialize(_, new_capturer.get(), -1));

Powered by Google App Engine
This is Rietveld 408576698