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

Side by Side Diff: media/base/mock_filters.h

Issue 7461016: Replace VideoDecoder::media_format() with significantly simpler width()/height() methods. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src
Patch Set: Created 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 // A new breed of mock media filters, this time using gmock! Feel free to add 5 // A new breed of mock media filters, this time using gmock! Feel free to add
6 // actions if you need interesting side-effects (i.e., copying data to the 6 // actions if you need interesting side-effects (i.e., copying data to the
7 // buffer passed into MockDataSource::Read()). 7 // buffer passed into MockDataSource::Read()).
8 // 8 //
9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock 9 // Don't forget you can use StrictMock<> and NiceMock<> if you want the mock
10 // filters to fail the test or do nothing when an unexpected method is called. 10 // filters to fail the test or do nothing when an unexpected method is called.
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 // Filter implementation. 178 // Filter implementation.
179 MOCK_METHOD1(Stop, void(FilterCallback* callback)); 179 MOCK_METHOD1(Stop, void(FilterCallback* callback));
180 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate)); 180 MOCK_METHOD1(SetPlaybackRate, void(float playback_rate));
181 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb)); 181 MOCK_METHOD2(Seek, void(base::TimeDelta time, const FilterStatusCB& cb));
182 MOCK_METHOD0(OnAudioRendererDisabled, void()); 182 MOCK_METHOD0(OnAudioRendererDisabled, void());
183 183
184 // VideoDecoder implementation. 184 // VideoDecoder implementation.
185 MOCK_METHOD3(Initialize, void(DemuxerStream* stream, 185 MOCK_METHOD3(Initialize, void(DemuxerStream* stream,
186 FilterCallback* callback, 186 FilterCallback* callback,
187 StatisticsCallback* stats_callback)); 187 StatisticsCallback* stats_callback));
188 MOCK_METHOD0(media_format, const MediaFormat&());
189 MOCK_METHOD1(ProduceVideoFrame, void(scoped_refptr<VideoFrame>)); 188 MOCK_METHOD1(ProduceVideoFrame, void(scoped_refptr<VideoFrame>));
190 MOCK_METHOD0(ProvidesBuffer, bool()); 189 MOCK_METHOD0(ProvidesBuffer, bool());
190 MOCK_METHOD0(width, int());
191 MOCK_METHOD0(height, int());
191 192
192 void VideoFrameReadyForTest(scoped_refptr<VideoFrame> frame) { 193 void VideoFrameReadyForTest(scoped_refptr<VideoFrame> frame) {
193 VideoDecoder::VideoFrameReady(frame); 194 VideoDecoder::VideoFrameReady(frame);
194 } 195 }
195 196
196 protected: 197 protected:
197 virtual ~MockVideoDecoder(); 198 virtual ~MockVideoDecoder();
198 199
199 private: 200 private:
200 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder); 201 DISALLOW_COPY_AND_ASSIGN(MockVideoDecoder);
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 public: 354 public:
354 MockStatisticsCallback(); 355 MockStatisticsCallback();
355 ~MockStatisticsCallback(); 356 ~MockStatisticsCallback();
356 357
357 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics)); 358 MOCK_METHOD1(OnStatistics, void(const media::PipelineStatistics& statistics));
358 }; 359 };
359 360
360 } // namespace media 361 } // namespace media
361 362
362 #endif // MEDIA_BASE_MOCK_FILTERS_H_ 363 #endif // MEDIA_BASE_MOCK_FILTERS_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698