Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 /* | |
| 2 * Copyright (c) 2017 The WebRTC project authors. All Rights Reserved. | |
| 3 * | |
| 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 | |
| 6 * tree. An additional intellectual property rights grant can be found | |
| 7 * in the file PATENTS. All contributing project authors may | |
| 8 * be found in the AUTHORS file in the root of the source tree. | |
| 9 */ | |
| 10 | |
| 11 #ifndef WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_ | |
| 12 #define WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_ | |
| 13 | |
| 14 #include <memory> | |
| 15 | |
| 16 #include "webrtc/modules/audio_processing/include/aec_dump.h" | |
| 17 #include "webrtc/modules/include/module_common_types.h" | |
| 18 #include "webrtc/test/gmock.h" | |
| 19 | |
| 20 namespace webrtc { | |
| 21 | |
| 22 namespace test { | |
| 23 | |
| 24 class MockAecDump : public AecDump { | |
| 25 public: | |
| 26 // To log an input/output pair, call the AddCapture* methods | |
|
peah-webrtc
2017/05/22 06:56:37
Is this comment needed in a mock? Can't one instea
| |
| 27 // followed by a WriteCaptureStreamMessage call. | |
| 28 | |
| 29 MockAecDump(); | |
| 30 virtual ~MockAecDump(); | |
| 31 | |
| 32 MOCK_METHOD1(AddCaptureStreamInput, void(const FloatAudioFrame& src)); | |
| 33 | |
| 34 MOCK_METHOD1(AddCaptureStreamOutput, void(const FloatAudioFrame& src)); | |
| 35 MOCK_METHOD1(AddCaptureStreamInput, void(const AudioFrame& frame)); | |
| 36 MOCK_METHOD1(AddCaptureStreamOutput, void(const AudioFrame& frame)); | |
| 37 MOCK_METHOD1(AddAudioProcessingState, | |
| 38 void(const AudioProcessingState& state)); | |
| 39 MOCK_METHOD1(WriteInitMessage, | |
| 40 void(const InternalAPMStreamsConfig& streams_config)); | |
| 41 MOCK_METHOD1(WriteRenderStreamMessage, void(const AudioFrame& frame)); | |
| 42 MOCK_METHOD1(WriteRenderStreamMessage, void(const FloatAudioFrame& src)); | |
| 43 MOCK_METHOD0(WriteCaptureStreamMessage, void()); | |
| 44 MOCK_METHOD2(WriteConfig, void(const InternalAPMConfig& config, bool forced)); | |
| 45 }; | |
| 46 | |
| 47 } // namespace test | |
| 48 | |
| 49 } // namespace webrtc | |
| 50 | |
| 51 #endif // WEBRTC_MODULES_AUDIO_PROCESSING_AEC_DUMP_MOCK_AEC_DUMP_H_ | |
| OLD | NEW |