Chromium Code Reviews
Help | Chromium Project | Sign in
(389)

Issue 3148003: Allow unit tests to use a mock audio input controller. (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 9 months ago by Satish
Modified:
4 years ago
CC:
chromium-reviews, scherkus (very slow to review), fbarchard, awong (On leave)
Visibility:
Public.

Description

Allow unit tests to use a mock audio input controller. This is modelled after chrome/common/net/test_url_fetcher_factory.h. Using this mock unit tests can stub out the audio recording part and test the consumer of the audio data. I have also added a new media_test_support target to media.gyp, this will be used in subsequent CLs for testing speech input code. BUG=none TEST=none, this code will get used in future unit tests Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=55627

Patch Set 1 #

Total comments: 10

Patch Set 2 : Address review comments from Jeremy and Alpha #

Unified diffs Side-by-side diffs Delta from patch set Stats (+191 lines, -3 lines) Patch
M media/audio/audio_input_controller.h View 5 chunks +27 lines, -3 lines 0 comments Download
M media/audio/audio_input_controller.cc View 2 chunks +8 lines, -0 lines 0 comments Download
A media/audio/test_audio_input_controller_factory.h View 1 1 chunk +100 lines, -0 lines 0 comments Download
A media/audio/test_audio_input_controller_factory.cc View 1 chunk +44 lines, -0 lines 0 comments Download
M media/media.gyp View 1 chunk +12 lines, -0 lines 0 comments Download
Commit: CQ not working?

Messages

Total messages: 7 (0 generated)
Satish
4 years, 9 months ago (2010-08-10 17:18:07 UTC) #1
jorlow
Few nits I noticed, but I really don't think I'm the right reviewer for this. ...
4 years, 9 months ago (2010-08-10 17:35:57 UTC) #2
Satish
Thanks, I've included Alpha and Carlos who are more familiar with the audio code to ...
4 years, 9 months ago (2010-08-10 20:31:55 UTC) #3
Alpha Left Google
Mostly nits and one question. I recommend you use gmock for creating a mock object, ...
4 years, 9 months ago (2010-08-10 20:40:43 UTC) #4
Alpha Left Google
http://codereview.chromium.org/3148003/diff/1/5 File media/audio/test_audio_input_controller_factory.h (right): http://codereview.chromium.org/3148003/diff/1/5#newcode18 media/audio/test_audio_input_controller_factory.h:18: // TestAudioInputController::Record and Close are overriden to do nothing. ...
4 years, 9 months ago (2010-08-10 20:44:25 UTC) #5
Satish
Thanks, fixed style issues and one reply below: > http://codereview.chromium.org/3148003/diff/1/6#newcode288 > media/media.gyp:288: { > Is ...
4 years, 9 months ago (2010-08-10 20:57:35 UTC) #6
Alpha Left Google
4 years, 9 months ago (2010-08-10 21:03:33 UTC) #7
On 2010/08/10 20:57:35, Satish wrote:
> Thanks, fixed style issues and one reply below:
> 
> > http://codereview.chromium.org/3148003/diff/1/6#newcode288
> > media/media.gyp:288: {
> > Is the test going to be in media_unittests or are you intended to use these
> test
> > objects else where?
> 
> Elsewhere.. the first test to use media_test_support will be in
> chrome/browser/speech.

LGTM.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld ec887be