Chromium Code Reviews| Index: webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h |
| diff --git a/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h b/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..6e5737c89b87b792ebbbf6a7014b936d87493ed7 |
| --- /dev/null |
| +++ b/webrtc/modules/audio_coding/codecs/mock/mock_audio_decoder_factory.h |
| @@ -0,0 +1,37 @@ |
| +/* |
| + * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. |
| + * |
| + * Use of this source code is governed by a BSD-style license |
| + * that can be found in the LICENSE file in the root of the source |
| + * tree. An additional intellectual property rights grant can be found |
| + * in the file PATENTS. All contributing project authors may |
| + * be found in the AUTHORS file in the root of the source tree. |
| + */ |
| + |
| +#ifndef WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ |
| +#define WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ |
| + |
| +#include <vector> |
| + |
| +#include "testing/gmock/include/gmock/gmock.h" |
| +#include "webrtc/modules/audio_coding/codecs/audio_decoder_factory.h" |
| + |
| +namespace webrtc { |
| + |
| +class MockAudioDecoderFactory : public AudioDecoderFactory { |
| + public: |
| + MOCK_METHOD0(GetSupportedFormats, std::vector<SdpAudioFormat>()); |
| + std::unique_ptr<AudioDecoder> MakeAudioDecoder( |
| + const SdpAudioFormat& format) { |
|
kwiberg-webrtc
2016/05/02 20:20:00
I had to remove the "override" here, because of th
|
| + std::unique_ptr<AudioDecoder> return_value; |
| + MakeAudioDecoderMock(format, &return_value); |
| + return return_value; |
| + } |
| + MOCK_METHOD2(MakeAudioDecoderMock, |
| + void(const SdpAudioFormat& format, |
| + std::unique_ptr<AudioDecoder>* return_value)); |
| +}; |
| + |
| +} // namespace webrtc |
| + |
| +#endif // WEBRTC_MODULES_AUDIO_CODING_CODECS_MOCK_MOCK_AUDIO_DECODER_FACTORY_H_ |