Upstream version 11.40.271.0
[platform/framework/web/crosswalk.git] / src / third_party / webrtc / common_audio / vad / mock / mock_vad.h
1 /*
2  *  Copyright (c) 2014 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_COMMON_AUDIO_VAD_MOCK_MOCK_VAD_H_
12 #define WEBRTC_COMMON_AUDIO_VAD_MOCK_MOCK_VAD_H_
13
14 #include "webrtc/common_audio/vad/include/vad.h"
15
16 #include "testing/gmock/include/gmock/gmock.h"
17
18 namespace webrtc {
19
20 class MockVad : public Vad {
21  public:
22   explicit MockVad(enum Aggressiveness mode) {}
23   virtual ~MockVad() { Die(); }
24   MOCK_METHOD0(Die, void());
25
26   MOCK_METHOD3(VoiceActivity,
27                enum Activity(const int16_t* audio,
28                              size_t num_samples,
29                              int sample_rate_hz));
30 };
31
32 }  // namespace webrtc
33
34 #endif  // WEBRTC_COMMON_AUDIO_VAD_MOCK_MOCK_VAD_H_