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

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

Issue 2750503002: Provide a default return value for mock_audio_device_.TimeUntilNextProcess. (Closed)
Patch Set: 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 37 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 return proxy; 55 return proxy;
56 })); 56 }));
57 57
58 ON_CALL(mock_audio_device_, TimeUntilNextProcess())
59 .WillByDefault(testing::Return(1000));
58 ON_CALL(*this, audio_device_module()) 60 ON_CALL(*this, audio_device_module())
59 .WillByDefault(testing::Return(&mock_audio_device_)); 61 .WillByDefault(testing::Return(&mock_audio_device_));
60 ON_CALL(*this, audio_processing()) 62 ON_CALL(*this, audio_processing())
61 .WillByDefault(testing::Return(&mock_audio_processing_)); 63 .WillByDefault(testing::Return(&mock_audio_processing_));
62 ON_CALL(*this, audio_transport()) 64 ON_CALL(*this, audio_transport())
63 .WillByDefault(testing::Return(&mock_audio_transport_)); 65 .WillByDefault(testing::Return(&mock_audio_transport_));
64 } 66 }
65 virtual ~MockVoiceEngine() /* override */ { 67 virtual ~MockVoiceEngine() /* override */ {
66 // Decrease ref count before base class d-tor is called; otherwise it will 68 // Decrease ref count before base class d-tor is called; otherwise it will
67 // trigger an assertion. 69 // trigger an assertion.
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_; 266 rtc::scoped_refptr<AudioDecoderFactory> decoder_factory_;
265 267
266 MockAudioDeviceModule mock_audio_device_; 268 MockAudioDeviceModule mock_audio_device_;
267 MockAudioProcessing mock_audio_processing_; 269 MockAudioProcessing mock_audio_processing_;
268 MockAudioTransport mock_audio_transport_; 270 MockAudioTransport mock_audio_transport_;
269 }; 271 };
270 } // namespace test 272 } // namespace test
271 } // namespace webrtc 273 } // namespace webrtc
272 274
273 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_ 275 #endif // WEBRTC_AUDIO_MOCK_VOICE_ENGINE_H_
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698