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

Side by Side Diff: media/video/video_mock_objects.h

Issue 6413036: Another big out-of-lining of test code. Hits a lot of gmock objects (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: lei comments Created 9 years, 10 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « media/media.gyp ('k') | media/video/video_mock_objects.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MEDIA_VIDEO_MOCK_OBJECTS_H_ 5 #ifndef MEDIA_VIDEO_MOCK_OBJECTS_H_
6 #define MEDIA_VIDEO_MOCK_OBJECTS_H_ 6 #define MEDIA_VIDEO_MOCK_OBJECTS_H_
7 7
8 #include "media/video/video_decode_context.h" 8 #include "media/video/video_decode_context.h"
9 #include "media/video/video_decode_engine.h" 9 #include "media/video/video_decode_engine.h"
10 #include "testing/gmock/include/gmock/gmock.h" 10 #include "testing/gmock/include/gmock/gmock.h"
11 11
12 namespace media { 12 namespace media {
13 13
14 class MockVideoDecodeEngine : public VideoDecodeEngine { 14 class MockVideoDecodeEngine : public VideoDecodeEngine {
15 public: 15 public:
16 MockVideoDecodeEngine() {} 16 MockVideoDecodeEngine();
17 virtual ~MockVideoDecodeEngine() {} 17 virtual ~MockVideoDecodeEngine();
18 18
19 MOCK_METHOD4(Initialize, void(MessageLoop* message_loop, 19 MOCK_METHOD4(Initialize, void(MessageLoop* message_loop,
20 EventHandler* event_handler, 20 EventHandler* event_handler,
21 VideoDecodeContext* context, 21 VideoDecodeContext* context,
22 const VideoCodecConfig& config)); 22 const VideoCodecConfig& config));
23 MOCK_METHOD0(Uninitialize, void()); 23 MOCK_METHOD0(Uninitialize, void());
24 MOCK_METHOD0(Flush, void()); 24 MOCK_METHOD0(Flush, void());
25 MOCK_METHOD0(Seek, void()); 25 MOCK_METHOD0(Seek, void());
26 MOCK_METHOD1(ConsumeVideoSample, void(scoped_refptr<Buffer> buffer)); 26 MOCK_METHOD1(ConsumeVideoSample, void(scoped_refptr<Buffer> buffer));
27 MOCK_METHOD1(ProduceVideoFrame, void(scoped_refptr<VideoFrame> frame)); 27 MOCK_METHOD1(ProduceVideoFrame, void(scoped_refptr<VideoFrame> frame));
28 28
29 private: 29 private:
30 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeEngine); 30 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeEngine);
31 }; 31 };
32 32
33 class MockVideoDecodeContext : public VideoDecodeContext { 33 class MockVideoDecodeContext : public VideoDecodeContext {
34 public: 34 public:
35 MockVideoDecodeContext() {} 35 MockVideoDecodeContext();
36 virtual ~MockVideoDecodeContext() {} 36 virtual ~MockVideoDecodeContext();
37 37
38 MOCK_METHOD0(GetDevice, void*()); 38 MOCK_METHOD0(GetDevice, void*());
39 MOCK_METHOD6(AllocateVideoFrames, void( 39 MOCK_METHOD6(AllocateVideoFrames, void(
40 int n, size_t width, size_t height, VideoFrame::Format format, 40 int n, size_t width, size_t height, VideoFrame::Format format,
41 std::vector<scoped_refptr<VideoFrame> >* frames, 41 std::vector<scoped_refptr<VideoFrame> >* frames,
42 Task* task)); 42 Task* task));
43 MOCK_METHOD0(ReleaseAllVideoFrames, void()); 43 MOCK_METHOD0(ReleaseAllVideoFrames, void());
44 MOCK_METHOD3(ConvertToVideoFrame, void( 44 MOCK_METHOD3(ConvertToVideoFrame, void(
45 void* buffer, scoped_refptr<VideoFrame> frame, Task* task)); 45 void* buffer, scoped_refptr<VideoFrame> frame, Task* task));
46 MOCK_METHOD1(Destroy, void(Task* task)); 46 MOCK_METHOD1(Destroy, void(Task* task));
47 47
48 private: 48 private:
49 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeContext); 49 DISALLOW_COPY_AND_ASSIGN(MockVideoDecodeContext);
50 }; 50 };
51 51
52 } // namespace media 52 } // namespace media
53 53
54 #endif // MEDIA_VIDEO_MOCK_OBJECTS_H_ 54 #endif // MEDIA_VIDEO_MOCK_OBJECTS_H_
OLDNEW
« no previous file with comments | « media/media.gyp ('k') | media/video/video_mock_objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698