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

Issue 149423: Converted remaining tests to use gmock and deleted all old mocking code. (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

Converted remaining tests to use gmock and deleted all old mocking code. The most important part was refactoring PipelineImpl tests in preparation for message loop injection. The old mocks just did not work *at all* with my message loop injection patch. BUG=16008 TEST=media_unittests should pass and not flake out

Patch Set 1 #

Total comments: 3

Patch Set 2 : Merge with git-svn #

Patch Set 3 : Trying again #

Total comments: 4

Patch Set 4 : Fixed nits #

Total comments: 6

Patch Set 5 : Fixes #

Patch Set 6 : Fix again #

Unified diffs Side-by-side diffs Delta from patch set Stats (+519 lines, -1126 lines) Patch
M media/base/mock_ffmpeg.h View 3 chunks +8 lines, -0 lines 0 comments Download
M media/base/mock_ffmpeg.cc View 3 chunks +41 lines, -0 lines 0 comments Download
M media/base/mock_filters.h View 1 2 3 4 7 chunks +50 lines, -1 line 0 comments Download
M media/base/mock_media_filters.h View 1 1 chunk +0 lines, -656 lines 0 comments Download
M media/base/pipeline_impl_unittest.cc View 1 2 3 4 5 6 chunks +162 lines, -86 lines 0 comments Download
M media/base/video_frame_impl_unittest.cc View 1 2 3 4 4 chunks +37 lines, -13 lines 0 comments Download
M media/filters/ffmpeg_glue_unittest.cc View 1 2 3 4 5 chunks +221 lines, -220 lines 0 comments Download
M media/filters/test_video_decoder.h View 1 chunk +0 lines, -80 lines 0 comments Download
M media/filters/test_video_renderer.h View 1 chunk +0 lines, -67 lines 0 comments Download
M media/media.gyp View 2 chunks +0 lines, -3 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
scherkus (not reviewing)
The last of the test refactoring... everything is cleaned up and our tests are even ...
11 years, 5 months ago (2009-07-09 22:52:48 UTC) #1
Alpha Left Google
LGTM, just a few nits. http://codereview.chromium.org/149423/diff/1/3 File media/base/mock_ffmpeg.cc (right): http://codereview.chromium.org/149423/diff/1/3#newcode29 Line 29: if (!protocol_) { ...
11 years, 5 months ago (2009-07-10 17:23:39 UTC) #2
scherkus (not reviewing)
http://codereview.chromium.org/149423/diff/1016/1019 File media/base/mock_filters.h (right): http://codereview.chromium.org/149423/diff/1016/1019#newcode103 Line 103: media_format_.SetAsString(MediaFormat::kMimeType, mime_type); On 2009/07/10 17:23:39, Alpha wrote: > ...
11 years, 5 months ago (2009-07-10 18:51:49 UTC) #3
awong
LGTM 2 small nitpicks. http://codereview.chromium.org/149423/diff/28/31 File media/base/mock_filters.h (right): http://codereview.chromium.org/149423/diff/28/31#newcode218 Line 218: is_creating_ = is_creating; is_creating_ ...
11 years, 5 months ago (2009-07-10 19:38:29 UTC) #4
Alpha Left Google
LGTM after ajwong's concerns are addressed.
11 years, 5 months ago (2009-07-10 20:40:47 UTC) #5
scherkus (not reviewing)
11 years, 5 months ago (2009-07-10 20:45:41 UTC) #6
http://codereview.chromium.org/149423/diff/28/31
File media/base/mock_filters.h (right):

http://codereview.chromium.org/149423/diff/28/31#newcode218
Line 218: is_creating_ = is_creating;
On 2009/07/10 19:38:29, awong wrote:
> is_creating_ is a strange name for something that flags if creation was
> successful.  Do you want creation_successful_?

Done.

http://codereview.chromium.org/149423/diff/28/34
File media/base/video_frame_impl_unittest.cc (right):

http://codereview.chromium.org/149423/diff/28/34#newcode93
Line 93: TEST(VideoFrameImpl, Implementation) {
On 2009/07/10 19:38:29, awong wrote:
> not a great name.. do you mean CreateFame?

Done.

http://codereview.chromium.org/149423/diff/28/35
File media/filters/ffmpeg_glue_unittest.cc (right):

http://codereview.chromium.org/149423/diff/28/35#newcode182
Line 182: EXPECT_EQ(AVERROR_IO, protocol_->url_write(&context, buffer, -1));
On 2009/07/10 19:38:29, awong wrote:
> What does -1 do?

nothing!  removed

Powered by Google App Engine
This is Rietveld 408576698