OLD | NEW |
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 Loading... |
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 })); |
55 return proxy; | 60 return proxy; |
56 })); | 61 })); |
57 | 62 |
58 ON_CALL(mock_audio_device_, TimeUntilNextProcess()) | 63 ON_CALL(mock_audio_device_, TimeUntilNextProcess()) |
59 .WillByDefault(testing::Return(1000)); | 64 .WillByDefault(testing::Return(1000)); |
60 ON_CALL(*this, audio_device_module()) | 65 ON_CALL(*this, audio_device_module()) |
61 .WillByDefault(testing::Return(&mock_audio_device_)); | 66 .WillByDefault(testing::Return(&mock_audio_device_)); |
62 ON_CALL(*this, audio_processing()) | 67 ON_CALL(*this, audio_processing()) |
63 .WillByDefault(testing::Return(&mock_audio_processing_)); | 68 .WillByDefault(testing::Return(&mock_audio_processing_)); |
64 ON_CALL(*this, audio_transport()) | 69 ON_CALL(*this, audio_transport()) |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; | 242 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; |
238 | 243 |
239 MockAudioDeviceModule mock_audio_device_; | 244 MockAudioDeviceModule mock_audio_device_; |
240 MockAudioProcessing mock_audio_processing_; | 245 MockAudioProcessing mock_audio_processing_; |
241 MockAudioTransport mock_audio_transport_; | 246 MockAudioTransport mock_audio_transport_; |
242 }; | 247 }; |
243 } // namespace test | 248 } // namespace test |
244 } // namespace webrtc | 249 } // namespace webrtc |
245 | 250 |
246 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ | 251 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ |
OLD | NEW |