webrtc/logging/rtc_event_log/mock/mock_rtc_event_log.h
Elad Alon 604c14df58 Reland "Remove deprecated functions from RtcEventLog"
The unified Log() interface replaces the many old LogX() functions. This helps hide dependencies between the modules which log different events.

TBR=stefan@webrtc.org

Bug: webrtc:8111
Change-Id: I36c8b6c4cf03d738c9033af2e98db6dc200eede9
Reviewed-on: https://webrtc-review.googlesource.com/6940
Commit-Queue: Elad Alon <eladalon@webrtc.org>
Reviewed-by: Elad Alon <eladalon@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20170}
2017-10-05 15:07:53 +00:00

38 lines
1.1 KiB
C++

/*
* 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 LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
#define LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_
#include <memory>
#include "logging/rtc_event_log/rtc_event_log.h"
#include "test/gmock.h"
namespace webrtc {
class MockRtcEventLog : public RtcEventLog {
public:
virtual bool StartLogging(std::unique_ptr<RtcEventLogOutput> output) {
return StartLoggingProxy(output.get());
}
MOCK_METHOD1(StartLoggingProxy, bool(RtcEventLogOutput*));
MOCK_METHOD0(StopLogging, void());
virtual void Log(std::unique_ptr<RtcEvent> event) {
return LogProxy(event.get());
}
MOCK_METHOD1(LogProxy, void(RtcEvent*));
};
} // namespace webrtc
#endif // LOGGING_RTC_EVENT_LOG_MOCK_MOCK_RTC_EVENT_LOG_H_