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

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

Issue 23752002: Always set need_audio_processing_ to true in WebRtcLocalAudioTrack. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Update tests Created 7 years, 4 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 | « content/renderer/media/webrtc_local_audio_track.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 b75ca79b920f230ac68f68b1658808df5daba2b3..534784b9831239f00886582162ba5cbafd4f29b8 100644
--- a/content/renderer/media/webrtc_local_audio_track_unittest.cc
+++ b/content/renderer/media/webrtc_local_audio_track_unittest.cc
@@ -181,14 +181,15 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectAndDisconnectOneSink) {
base::WaitableEvent event(false, false);
EXPECT_CALL(*sink, SetCaptureFormat(_)).WillOnce(Return());
EXPECT_CALL(*sink,
- CaptureData(kNumberOfNetworkChannels,
- params.sample_rate(),
- params.channels(),
- params.frames_per_buffer(),
- 0,
- 0,
- false,
- false)).Times(AtLeast(1))
+ CaptureData(kNumberOfNetworkChannels,
+ params.sample_rate(),
+ params.channels(),
+ params.frames_per_buffer(),
+ 0,
+ 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event));
track->AddSink(sink.get());
@@ -268,14 +269,15 @@ TEST_F(WebRtcLocalAudioTrackTest, MultipleAudioTracks) {
base::WaitableEvent event_1(false, false);
EXPECT_CALL(*sink_1, SetCaptureFormat(_)).WillOnce(Return());
EXPECT_CALL(*sink_1,
- CaptureData(1,
- params.sample_rate(),
- params.channels(),
- params.frames_per_buffer(),
- 0,
- 0,
- false,
- false)).Times(AtLeast(1))
+ CaptureData(1,
+ params.sample_rate(),
+ params.channels(),
+ params.frames_per_buffer(),
+ 0,
+ 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_1));
track_1->AddSink(sink_1.get());
EXPECT_TRUE(event_1.TimedWait(TestTimeouts::tiny_timeout()));
@@ -295,24 +297,26 @@ TEST_F(WebRtcLocalAudioTrackTest, MultipleAudioTracks) {
new MockWebRtcAudioCapturerSink());
EXPECT_CALL(*sink_2, SetCaptureFormat(_)).WillOnce(Return());
EXPECT_CALL(*sink_1,
- CaptureData(1,
- params.sample_rate(),
- params.channels(),
- params.frames_per_buffer(),
- 0,
- 0,
- false,
- false)).Times(AtLeast(1))
+ CaptureData(1,
+ params.sample_rate(),
+ params.channels(),
+ params.frames_per_buffer(),
+ 0,
+ 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_1));
EXPECT_CALL(*sink_2,
- CaptureData(1,
- params.sample_rate(),
- params.channels(),
- params.frames_per_buffer(),
- 0,
- 0,
- false,
- false)).Times(AtLeast(1))
+ CaptureData(1,
+ params.sample_rate(),
+ params.channels(),
+ params.frames_per_buffer(),
+ 0,
+ 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false)).Times(AtLeast(1))
.WillRepeatedly(SignalEvent(&event_2));
track_2->AddSink(sink_2.get());
EXPECT_TRUE(event_1.TimedWait(TestTimeouts::tiny_timeout()));
@@ -361,7 +365,10 @@ TEST_F(WebRtcLocalAudioTrackTest, StartAndStopAudioTracks) {
scoped_ptr<MockWebRtcAudioCapturerSink> sink(
new MockWebRtcAudioCapturerSink());
event.Reset();
- EXPECT_CALL(*sink, CaptureData(_, _, _, _, 0, 0, false, false))
+ EXPECT_CALL(*sink, CaptureData(_, _, _, _, 0, 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false))
.Times(AnyNumber()).WillRepeatedly(Return());
EXPECT_CALL(*sink, SetCaptureFormat(_)).Times(1);
track_1->AddSink(sink.get());
@@ -441,7 +448,10 @@ TEST_F(WebRtcLocalAudioTrackTest, ConnectTracksToDifferentCapturers) {
EXPECT_CALL(
*sink_1.get(),
CaptureData(
- kNumberOfNetworkChannelsForTrack1, 48000, 2, _, 0, 0, false, false))
+ kNumberOfNetworkChannelsForTrack1, 48000, 2, _, 0, 0,
+ // TODO(tommi): Change to |false| when issue 277134 is fixed.
+ true,
+ false))
.Times(AnyNumber()).WillRepeatedly(Return());
EXPECT_CALL(*sink_1.get(), SetCaptureFormat(_)).Times(1);
track_1->AddSink(sink_1.get());
« no previous file with comments | « content/renderer/media/webrtc_local_audio_track.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698