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

Side by Side Diff: webrtc/test/mock_voice_engine.h

Issue 2686043006: WebRtcVoiceMediaChannel::AddRecvStream: Don't call SetRecPayloadType (Closed)
Patch Set: Discard packets when updating payload type map Created 3 years, 9 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license 4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source 5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found 6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may 7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree. 8 * be found in the AUTHORS file in the root of the source tree.
9 */ 9 */
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 // will create a NiceMock of a voe::ChannelProxy. 45 // will create a NiceMock of a voe::ChannelProxy.
46 // TODO(ossu): As long as AudioReceiveStream is implemented as a wrapper 46 // TODO(ossu): As long as AudioReceiveStream is implemented as a wrapper
47 // around Channel, we need to make sure ChannelProxy returns the same 47 // around Channel, we need to make sure ChannelProxy returns the same
48 // decoder factory as the one passed in when creating an AudioReceiveStream. 48 // decoder factory as the one passed in when creating an AudioReceiveStream.
49 ON_CALL(*this, ChannelProxyFactory(testing::_)) 49 ON_CALL(*this, ChannelProxyFactory(testing::_))
50 .WillByDefault(testing::Invoke([this](int channel_id) { 50 .WillByDefault(testing::Invoke([this](int channel_id) {
51 auto* proxy = 51 auto* proxy =
52 new testing::NiceMock<webrtc::test::MockVoEChannelProxy>(); 52 new testing::NiceMock<webrtc::test::MockVoEChannelProxy>();
53 EXPECT_CALL(*proxy, GetAudioDecoderFactory()) 53 EXPECT_CALL(*proxy, GetAudioDecoderFactory())
54 .WillRepeatedly(testing::ReturnRef(decoder_factory_)); 54 .WillRepeatedly(testing::ReturnRef(decoder_factory_));
55 EXPECT_CALL(*proxy, SetReceiveCodecs(testing::_))
56 .WillRepeatedly(testing::Invoke(
57 [](const std::map<int, SdpAudioFormat>& codecs) {
58 EXPECT_THAT(codecs, testing::IsEmpty());
59 return true;
60 }));
55 return proxy; 61 return proxy;
56 })); 62 }));
57 63
58 ON_CALL(mock_audio_device_, TimeUntilNextProcess()) 64 ON_CALL(mock_audio_device_, TimeUntilNextProcess())
59 .WillByDefault(testing::Return(1000)); 65 .WillByDefault(testing::Return(1000));
60 ON_CALL(*this, audio_device_module()) 66 ON_CALL(*this, audio_device_module())
61 .WillByDefault(testing::Return(&mock_audio_device_)); 67 .WillByDefault(testing::Return(&mock_audio_device_));
62 ON_CALL(*this, audio_processing()) 68 ON_CALL(*this, audio_processing())
63 .WillByDefault(testing::Return(&mock_audio_processing_)); 69 .WillByDefault(testing::Return(&mock_audio_processing_));
64 ON_CALL(*this, audio_transport()) 70 ON_CALL(*this, audio_transport())
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
260 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 266 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
261 267
262 MockAudioDeviceModule mock_audio_device_; 268 MockAudioDeviceModule mock_audio_device_;
263 MockAudioProcessing mock_audio_processing_; 269 MockAudioProcessing mock_audio_processing_;
264 MockAudioTransport mock_audio_transport_; 270 MockAudioTransport mock_audio_transport_;
265 }; 271 };
266 } // namespace test 272 } // namespace test
267 } // namespace webrtc 273 } // namespace webrtc
268 274
269 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ 275 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698