Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(677)

Unified Diff: media/base/mock_media_log.h

Issue 1306923004: Reland MSE: Verify MediaLog events created by existing WebM unit tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/base/mock_media_log.h
diff --git a/media/base/mock_media_log.h b/media/base/mock_media_log.h
index 04c011633c400895680301e79746c920f0cbae65..421c2d2048144311c6b4ba24039c49c18ebb594c 100644
--- a/media/base/mock_media_log.h
+++ b/media/base/mock_media_log.h
@@ -5,9 +5,19 @@
#ifndef MEDIA_BASE_MOCK_MEDIA_LOG_H_
#define MEDIA_BASE_MOCK_MEDIA_LOG_H_
+#include <string>
+
#include "media/base/media_log.h"
#include "testing/gmock/include/gmock/gmock.h"
+// Helper macros to reduce boilerplate when verifying media log entries.
+// |outer| is the std::string searched for substring |sub|.
+#define CONTAINS_STRING(outer, sub) (std::string::npos != (outer).find(sub))
+
+// "media_log_" is expected to be a scoped_refptr<MockMediaLog>, optionally a
+// StrictMock, in scope of the usage of this macro.
+#define EXPECT_MEDIA_LOG(x) EXPECT_CALL(*media_log_, DoAddEventLogString((x)))
+
namespace media {
class MockMediaLog : public MediaLog {
« no previous file with comments | « no previous file | media/filters/source_buffer_stream_unittest.cc » ('j') | media/formats/webm/webm_cluster_parser_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698