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

Issue 126306: Refactor FFmpegDemuxerTest to use gmock and eliminate flakiness. (Closed)

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

Description

Refactor FFmpegDemuxerTest to use gmock and eliminate flakiness. This eliminates all final traces of the old global-functions-and-variables style of mocking, which was a massive headache to maintain and verify correctness. No new tests have been added, however gmock creates much stronger assertions for the tests themselves. I also made FFmpegDemuxerTest a friend of FFmpegDemuxer to let tests verify that all tasks on the internal demuxing thread have completed. BUG=13933 TEST=FFmpegDemuxerTest should more awesome and less flaky

Patch Set 1 #

Total comments: 18

Patch Set 2 : Addressed comments #

Total comments: 20

Patch Set 3 : Addressed more comments #

Patch Set 4 : Added SCOPED_TRACE #

Unified diffs Side-by-side diffs Delta from patch set Stats (+569 lines, -438 lines) Patch
M media/base/mock_ffmpeg.h View 1 2 1 chunk +77 lines, -1 line 0 comments Download
M media/base/mock_ffmpeg.cc View 1 2 3 chunks +71 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.h View 1 chunk +3 lines, -0 lines 0 comments Download
M media/filters/ffmpeg_demuxer.cc View 1 2 3 2 chunks +3 lines, -1 line 0 comments Download
M media/filters/ffmpeg_demuxer_unittest.cc View 1 2 3 7 chunks +415 lines, -436 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
scherkus (not reviewing)
It's a substantial change, so I'm not sure how much value there is in the ...
11 years, 6 months ago (2009-06-17 23:24:19 UTC) #1
awong
couple of small comments, but looks awesome! You're like a gmock ninja now with all ...
11 years, 6 months ago (2009-06-17 23:54:49 UTC) #2
scherkus (not reviewing)
http://codereview.chromium.org/126306/diff/1/3 File media/base/mock_ffmpeg.h (right): http://codereview.chromium.org/126306/diff/1/3#newcode47 Line 47: static void DestructPacket(AVPacket* packet); On 2009/06/17 23:54:49, awong ...
11 years, 6 months ago (2009-06-18 00:29:28 UTC) #3
awong
http://codereview.chromium.org/126306/diff/1/6 File media/filters/ffmpeg_demuxer_unittest.cc (right): http://codereview.chromium.org/126306/diff/1/6#newcode68 Line 68: static const int kDurations[AV_STREAM_MAX]; On 2009/06/18 00:29:28, scherkus ...
11 years, 6 months ago (2009-06-18 00:38:08 UTC) #4
Alpha Left Google
Awsome use of gmock! http://codereview.chromium.org/126306/diff/3003/3004 File media/base/mock_ffmpeg.cc (right): http://codereview.chromium.org/126306/diff/3003/3004#newcode28 Line 28: DCHECK_GT(outstanding_packets_, 0); I think ...
11 years, 6 months ago (2009-06-18 18:39:11 UTC) #5
scherkus (not reviewing)
kablamo! http://codereview.chromium.org/126306/diff/1/6 File media/filters/ffmpeg_demuxer_unittest.cc (right): http://codereview.chromium.org/126306/diff/1/6#newcode149 Line 149: EXPECT_TRUE(demuxer_->Initialize(data_source_.get())); On 2009/06/18 00:38:08, awong wrote: > ...
11 years, 6 months ago (2009-06-18 22:50:12 UTC) #6
scherkus (not reviewing)
Added SCOPED_TRACE
11 years, 6 months ago (2009-06-19 02:22:11 UTC) #7
awong
11 years, 6 months ago (2009-06-19 17:51:04 UTC) #8
LGTM

Powered by Google App Engine
This is Rietveld 408576698