diff --git a/webrtc/pc/BUILD.gn b/webrtc/pc/BUILD.gn index 10256ce2f4..ae95a2cad3 100644 --- a/webrtc/pc/BUILD.gn +++ b/webrtc/pc/BUILD.gn @@ -389,6 +389,7 @@ if (rtc_include_tests) { "../media:rtc_media_tests_utils", "../pc:rtc_pc", "../system_wrappers:metrics_default", + "../test:audio_codec_mocks", "//testing/gmock", ] diff --git a/webrtc/test/BUILD.gn b/webrtc/test/BUILD.gn index 1c637c571a..0f8914fa87 100644 --- a/webrtc/test/BUILD.gn +++ b/webrtc/test/BUILD.gn @@ -581,6 +581,7 @@ rtc_source_set("test_renderer") { rtc_source_set("audio_codec_mocks") { testonly = true sources = [ + "mock_audio_decoder.cc", "mock_audio_decoder.h", "mock_audio_decoder_factory.h", "mock_audio_encoder.cc", diff --git a/webrtc/test/mock_audio_decoder.cc b/webrtc/test/mock_audio_decoder.cc new file mode 100644 index 0000000000..102ba794a9 --- /dev/null +++ b/webrtc/test/mock_audio_decoder.cc @@ -0,0 +1,20 @@ +/* + * Copyright (c) 2017 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. + */ + +#include "webrtc/test/mock_audio_decoder.h" + +namespace webrtc { + +MockAudioDecoder::MockAudioDecoder() = default; +MockAudioDecoder::~MockAudioDecoder() { + Die(); +} + +} // namespace webrtc diff --git a/webrtc/test/mock_audio_decoder.h b/webrtc/test/mock_audio_decoder.h index 8830021120..d124b0f8a1 100644 --- a/webrtc/test/mock_audio_decoder.h +++ b/webrtc/test/mock_audio_decoder.h @@ -18,8 +18,8 @@ namespace webrtc { class MockAudioDecoder : public AudioDecoder { public: - MockAudioDecoder() {} - virtual ~MockAudioDecoder() { Die(); } + MockAudioDecoder(); + ~MockAudioDecoder(); MOCK_METHOD0(Die, void()); MOCK_METHOD5(DecodeInternal, int(const uint8_t*, size_t, int, int16_t*, SpeechType*));