Update CrOS OOBE throbber to MD throbber; delete old asset
[chromium-blink-merge.git] / media / base / mock_media_log.h
blob04c011633c400895680301e79746c920f0cbae65
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef MEDIA_BASE_MOCK_MEDIA_LOG_H_
6 #define MEDIA_BASE_MOCK_MEDIA_LOG_H_
8 #include "media/base/media_log.h"
9 #include "testing/gmock/include/gmock/gmock.h"
11 namespace media {
13 class MockMediaLog : public MediaLog {
14 public:
15 MockMediaLog();
17 MOCK_METHOD1(DoAddEventLogString, void(const std::string& event));
19 // Trampoline method to workaround GMOCK problems with scoped_ptr<>.
20 // Also simplifies tests to be able to string match on the log string
21 // representation on the added event.
22 void AddEvent(scoped_ptr<MediaLogEvent> event) override {
23 DoAddEventLogString(MediaEventToLogString(*event));
26 protected:
27 virtual ~MockMediaLog();
29 private:
30 DISALLOW_COPY_AND_ASSIGN(MockMediaLog);
33 } // namespace media
35 #endif // MEDIA_BASE_MOCK_MEDIA_LOG_H_