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

Issue 149366: Updated FFmpegDemuxerTest and FFmpegVideoDecoderTest to use the gmock-based MockFilterHost. (Closed)

Created:
11 years, 5 months ago by scherkus (not reviewing)
Modified:
9 years, 7 months ago
CC:
chromium-reviews_googlegroups.com
Visibility:
Public.

Description

Updated FFmpegDemuxerTest and FFmpegVideoDecoderTest to use the gmock-based MockFilterHost. Also deleted the old MockPipeline and MockFilterHost code as it has been completely deprecated. BUG=16008 TEST=FFmpegDemuxerTest and FFmpegVideoDecoderTest

Patch Set 1 #

Total comments: 6

Patch Set 2 : Fixed break #

Unified diffs Side-by-side diffs Delta from patch set Stats (+29 lines, -338 lines) Patch
M media/base/mock_filter_host.h View 1 3 chunks +0 lines, -107 lines 0 comments Download
M media/base/mock_pipeline.h View 1 chunk +0 lines, -181 lines 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 8 chunks +17 lines, -27 lines 0 comments Download
M media/filters/ffmpeg_video_decoder_unittest.cc View 8 chunks +12 lines, -22 lines 0 comments Download
M media/media.gyp View 1 1 chunk +0 lines, -1 line 0 comments Download

Messages

Total messages: 7 (0 generated)
scherkus (not reviewing)
Based on http://codereview.chromium.org/149350 (which I'll commit shortly) Nothing too crazy here, fully deprecated the old ...
11 years, 5 months ago (2009-07-08 23:34:47 UTC) #1
awong
Die code! DIE! DDDDDIIIIIIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!!! *ahem* I'm calm now. http://codereview.chromium.org/149366/diff/1/4 File media/filters/ffmpeg_demuxer_unittest.cc (left): http://codereview.chromium.org/149366/diff/1/4#oldcode258 Line 258: ...
11 years, 5 months ago (2009-07-08 23:38:30 UTC) #2
awong
Oh, and uh, LGTM. On 2009/07/08 23:38:30, awong wrote: > Die code! DIE! > DDDDDIIIIIIIIIIIIIIIIIIIIIIIEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEE!!!!!!!!!!!!!!!!!!!!! ...
11 years, 5 months ago (2009-07-08 23:38:52 UTC) #3
scherkus (not reviewing)
http://codereview.chromium.org/149366/diff/1/4 File media/filters/ffmpeg_demuxer_unittest.cc (left): http://codereview.chromium.org/149366/diff/1/4#oldcode258 Line 258: // Since we ignore data streams, the duration ...
11 years, 5 months ago (2009-07-08 23:40:30 UTC) #4
Alpha Left Google
I have two tiny questions. :) http://codereview.chromium.org/149366/diff/1/4 File media/filters/ffmpeg_demuxer_unittest.cc (right): http://codereview.chromium.org/149366/diff/1/4#newcode146 Line 146: } Can ...
11 years, 5 months ago (2009-07-08 23:51:57 UTC) #5
scherkus (not reviewing)
http://codereview.chromium.org/149366/diff/1/4 File media/filters/ffmpeg_demuxer_unittest.cc (right): http://codereview.chromium.org/149366/diff/1/4#newcode146 Line 146: } On 2009/07/08 23:51:57, Alpha wrote: > Can ...
11 years, 5 months ago (2009-07-08 23:59:05 UTC) #6
awong
11 years, 5 months ago (2009-07-09 00:00:22 UTC) #7
On Wed, Jul 8, 2009 at 4:59 PM, <scherkus@chromium.org> wrote:

>
> http://codereview.chromium.org/149366/diff/1/4
> File media/filters/ffmpeg_demuxer_unittest.cc (right):
>
> http://codereview.chromium.org/149366/diff/1/4#newcode146
> Line 146: }
> On 2009/07/08 23:51:57, Alpha wrote:
>
>> Can we expect PIPELINE_OK here? Or because that we have initialized
>>
> that we
>
>> don't care?
>>
>
> since we use a StrictMock but don't set an expectation on Error(), it's
> impossible for PIPELINE_OK to get changed without the test failing
>
> therefore we infer that everything is still ok :)
>
> http://codereview.chromium.org/149366/diff/1/5
> File media/filters/ffmpeg_video_decoder_unittest.cc (right):
>
> http://codereview.chromium.org/149366/diff/1/5#newcode120
> Line 120: scoped_refptr<StrictMock<MockFFmpegDemuxerStream> > demuxer_;
> On 2009/07/08 23:51:57, Alpha wrote:
>
>> why this mock is scoped_refptr but unlike host_ be a member?
>>
>
> The base MediaFilter interface is ref-counted, therefore all subclasses
> (including the mocks) need to be destroyed via refcounts
>
> The FilterHost interface isn't ref-counted, so we can get away with a
> statically declared version


I ran into this issue gmocking other classes. It's annoying, but oh well.

Powered by Google App Engine
This is Rietveld 408576698