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

Issue 10704154: Small refactor to media architecture in order to allow end-to-end tests. (Closed)

Created:
8 years, 5 months ago by Primiano Tucci (use gerrit)
Modified:
8 years, 4 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, Satish, jam, feature-media-reviews_chromium.org
Visibility:
Public.

Description

Small refactor to media architecture in order to allow end-to-end tests. - Introduced the class MockAudioManager that will be used by upcoming speech recognition tests. - Added interface TestAudioInputController::Delegate, which allows to intercept Record/Close events. - Added audio_manager_for_tests_ static field in SpeechRecognizer to inject the MockAudioManager during tests. BUG=116954 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=146316

Patch Set 1 : #

Total comments: 6

Patch Set 2 : Moved MockAudioManager under media/, inherting from AudioManager, removing static field from AudioM… #

Total comments: 10

Patch Set 3 : Removed mock_audio_manager from /content/browser/speech #

Total comments: 2

Patch Set 4 : tommi@ review. #

Patch Set 5 : Fixed broken speech_recognizer_unittest.cc #

Patch Set 6 : Changed MockAudioManager ctor #

Total comments: 4

Patch Set 7 : tommi@ + satish@ nits (+reabase) #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+212 lines, -82 lines) Patch
M content/browser/speech/speech_recognizer.h View 1 2 3 3 chunks +4 lines, -2 lines 0 comments Download
M content/browser/speech/speech_recognizer.cc View 1 2 3 5 chunks +5 lines, -6 lines 0 comments Download
M content/browser/speech/speech_recognizer_unittest.cc View 1 2 3 4 5 4 chunks +4 lines, -65 lines 0 comments Download
A media/audio/mock_audio_manager.h View 1 2 3 4 5 6 1 chunk +69 lines, -0 lines 0 comments Download
A media/audio/mock_audio_manager.cc View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
M media/audio/test_audio_input_controller_factory.h View 1 2 3 5 chunks +25 lines, -3 lines 0 comments Download
M media/audio/test_audio_input_controller_factory.cc View 1 2 3 2 chunks +25 lines, -6 lines 1 comment Download
M media/media.gyp View 1 2 3 4 5 6 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 13 (0 generated)
Primiano Tucci (use gerrit)
8 years, 5 months ago (2012-07-11 08:55:59 UTC) #1
tommi (sloooow) - chröme
https://chromiumcodereview.appspot.com/10704154/diff/2001/content/browser/speech/mock_audio_manager.cc File content/browser/speech/mock_audio_manager.cc (right): https://chromiumcodereview.appspot.com/10704154/diff/2001/content/browser/speech/mock_audio_manager.cc#newcode103 content/browser/speech/mock_audio_manager.cc:103: }; remove semicolon https://chromiumcodereview.appspot.com/10704154/diff/2001/content/browser/speech/mock_audio_manager.h File content/browser/speech/mock_audio_manager.h (right): https://chromiumcodereview.appspot.com/10704154/diff/2001/content/browser/speech/mock_audio_manager.h#newcode15 content/browser/speech/mock_audio_manager.h:15: ...
8 years, 5 months ago (2012-07-11 09:59:08 UTC) #2
tommi (sloooow) - chröme
https://chromiumcodereview.appspot.com/10704154/diff/6003/content/browser/speech/speech_recognizer.cc File content/browser/speech/speech_recognizer.cc (right): https://chromiumcodereview.appspot.com/10704154/diff/6003/content/browser/speech/speech_recognizer.cc#newcode488 content/browser/speech/speech_recognizer.cc:488: recognition_engine_->AudioChunksEnded(); is this change intentional? https://chromiumcodereview.appspot.com/10704154/diff/6003/content/browser/speech/speech_recognizer.h File content/browser/speech/speech_recognizer.h (right): ...
8 years, 5 months ago (2012-07-11 11:12:30 UTC) #3
Primiano Tucci (use gerrit)
https://chromiumcodereview.appspot.com/10704154/diff/6003/content/browser/speech/speech_recognizer.cc File content/browser/speech/speech_recognizer.cc (right): https://chromiumcodereview.appspot.com/10704154/diff/6003/content/browser/speech/speech_recognizer.cc#newcode488 content/browser/speech/speech_recognizer.cc:488: recognition_engine_->AudioChunksEnded(); On 2012/07/11 11:12:30, tommi wrote: > is this ...
8 years, 5 months ago (2012-07-11 14:33:30 UTC) #4
Primiano Tucci (use gerrit)
Changed MockAudioManager ctor to take a MessageLoopProxy instead of ThreadID
8 years, 5 months ago (2012-07-11 16:42:05 UTC) #5
tommi (sloooow) - chröme
lgtm with one request below https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h File media/audio/mock_audio_manager.h (right): https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h#newcode25 media/audio/mock_audio_manager.h:25: scoped_refptr<base::MessageLoopProxy> message_loop_proxy); should be: ...
8 years, 5 months ago (2012-07-12 08:32:05 UTC) #6
Satish
lgtm https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h File media/audio/mock_audio_manager.h (right): https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h#newcode12 media/audio/mock_audio_manager.h:12: // This class is a simple mock around ...
8 years, 5 months ago (2012-07-12 09:38:13 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/primiano@chromium.org/10704154/8003
8 years, 5 months ago (2012-07-12 09:42:00 UTC) #8
Primiano Tucci (use gerrit)
https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h File media/audio/mock_audio_manager.h (right): https://chromiumcodereview.appspot.com/10704154/diff/2021/media/audio/mock_audio_manager.h#newcode12 media/audio/mock_audio_manager.h:12: // This class is a simple mock around AudioManager, ...
8 years, 5 months ago (2012-07-12 09:42:03 UTC) #9
commit-bot: I haz the power
Change committed as 146316
8 years, 5 months ago (2012-07-12 11:19:35 UTC) #10
Ami GONE FROM CHROMIUM
https://chromiumcodereview.appspot.com/10704154/diff/8003/media/audio/test_audio_input_controller_factory.cc File media/audio/test_audio_input_controller_factory.cc (right): https://chromiumcodereview.appspot.com/10704154/diff/8003/media/audio/test_audio_input_controller_factory.cc#newcode58 media/audio/test_audio_input_controller_factory.cc:58: void TestAudioInputControllerFactory::SetDelegateForTests( This is a dead method (nobody calls ...
8 years, 4 months ago (2012-08-06 23:12:09 UTC) #11
Primiano Tucci (use gerrit)
It was designed to be used by http://codereview.chromium.org/10703141/ I added hans@ in CC who tookover ...
8 years, 4 months ago (2012-08-07 07:12:31 UTC) #12
hans
8 years, 4 months ago (2012-08-07 09:29:44 UTC) #13
On 2012/08/07 07:12:31, Primiano Tucci wrote:
> It was designed to be used by http://codereview.chromium.org/10703141/
> I added hans@ in CC who tookover my work.
> 
>
https://chromiumcodereview.appspot.com/10704154/diff/8003/media/audio/test_au...
> > media/audio/test_audio_input_controller_factory.cc:58: void
> > TestAudioInputControllerFactory::SetDelegateForTests(
> > This is a dead method (nobody calls it).  Are there plans to use it sometime
> > soon or should it be deleted?

Yes, as Primiano pointed out, there are plans to use it soon.

Powered by Google App Engine
This is Rietveld 408576698