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

Unified Diff: media/base/mock_ffmpeg.h

Issue 149423: Converted remaining tests to use gmock and deleted all old mocking code. (Closed)
Patch Set: Fix again Created 11 years, 5 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
« no previous file with comments | « no previous file | media/base/mock_ffmpeg.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/base/mock_ffmpeg.h
diff --git a/media/base/mock_ffmpeg.h b/media/base/mock_ffmpeg.h
index 3afdef9225f3b4c6fd6a19b6a1941edefc42b641..4ba38fc7cddb9a30a27d18d81507f3a307287e1b 100644
--- a/media/base/mock_ffmpeg.h
+++ b/media/base/mock_ffmpeg.h
@@ -16,6 +16,10 @@ class MockFFmpeg {
MockFFmpeg();
virtual ~MockFFmpeg();
+ MOCK_METHOD0(AVCodecInit, void());
+ MOCK_METHOD1(AVRegisterProtocol, int(URLProtocol* protocol));
+ MOCK_METHOD0(AVRegisterAll, void());
+
MOCK_METHOD1(AVCodecFindDecoder, AVCodec*(enum CodecID id));
MOCK_METHOD2(AVCodecOpen, int(AVCodecContext* avctx, AVCodec* codec));
MOCK_METHOD1(AVCodecClose, int(AVCodecContext* avctx));
@@ -51,6 +55,9 @@ class MockFFmpeg {
static void set(MockFFmpeg* instance);
static MockFFmpeg* get();
+ // Returns the URLProtocol registered by the FFmpegGlue singleton.
+ static URLProtocol* protocol();
+
// AVPacket destructor for packets allocated by av_new_packet().
static void DestructPacket(AVPacket* packet);
@@ -60,6 +67,7 @@ class MockFFmpeg {
private:
static MockFFmpeg* instance_;
+ static URLProtocol* protocol_;
// Tracks the number of packets allocated by calls to av_read_frame() and
// av_free_packet(). We crash the unit test if this is not zero at time of
« no previous file with comments | « no previous file | media/base/mock_ffmpeg.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698