• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2016 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 LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
12 #define LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
13 
14 #include <memory>
15 
16 #include "api/rtc_event_log/rtc_event_log.h"
17 #include "test/gmock.h"
18 
19 namespace webrtc {
20 
21 class MockRtcEventLog : public RtcEventLog {
22  public:
23   MockRtcEventLog();
24   ~MockRtcEventLog() override;
25 
26   MOCK_METHOD(bool,
27               StartLogging,
28               (std::unique_ptr<RtcEventLogOutput> output,
29                int64_t output_period_ms),
30               (override));
31 
32   MOCK_METHOD(void, StopLogging, (), (override));
33 
Log(std::unique_ptr<RtcEvent> event)34   void Log(std::unique_ptr<RtcEvent> event) override {
35     return LogProxy(event.get());
36   }
37   MOCK_METHOD(void, LogProxy, (RtcEvent*));
38 };
39 
40 }  // namespace webrtc
41 
42 #endif  // LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
43