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

Unified Diff: media/audio/audio_input_controller_unittest.cc

Issue 314713002: Modifies AudioInputCallback::OnData and use media::AudioBus instead of plain byte vector (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed SpeechRecognitionBrowserTest Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: media/audio/audio_input_controller_unittest.cc
diff --git a/media/audio/audio_input_controller_unittest.cc b/media/audio/audio_input_controller_unittest.cc
index 4e11e350fc8700c468ff437ba7d8b441a73b3a24..e71232d573059782c9bfd0ca8c923e14c586d8a1 100644
--- a/media/audio/audio_input_controller_unittest.cc
+++ b/media/audio/audio_input_controller_unittest.cc
@@ -53,8 +53,8 @@ class MockAudioInputControllerEventHandler
MOCK_METHOD1(OnRecording, void(AudioInputController* controller));
MOCK_METHOD2(OnError, void(AudioInputController* controller,
AudioInputController::ErrorCode error_code));
- MOCK_METHOD3(OnData, void(AudioInputController* controller,
- const uint8* data, uint32 size));
+ MOCK_METHOD2(OnData,
+ void(AudioInputController* controller, const AudioBus* data));
MOCK_METHOD2(OnLog,
void(AudioInputController* controller,
const std::string& message));
@@ -117,10 +117,10 @@ TEST_F(AudioInputControllerTest, RecordAndClose) {
.Times(Exactly(1));
// OnData() shall be called ten times.
- EXPECT_CALL(event_handler, OnData(NotNull(), NotNull(), _))
+ EXPECT_CALL(event_handler, OnData(NotNull(), NotNull()))
.Times(AtLeast(10))
- .WillRepeatedly(CheckCountAndPostQuitTask(&count, 10,
- message_loop_.message_loop_proxy()));
+ .WillRepeatedly(CheckCountAndPostQuitTask(
+ &count, 10, message_loop_.message_loop_proxy()));
scoped_ptr<AudioManager> audio_manager(AudioManager::CreateForTesting());
AudioParameters params(AudioParameters::AUDIO_FAKE, kChannelLayout,
@@ -163,10 +163,10 @@ TEST_F(AudioInputControllerTest, DISABLED_RecordAndError) {
.Times(Exactly(1));
// OnData() shall be called ten times.
- EXPECT_CALL(event_handler, OnData(NotNull(), NotNull(), _))
+ EXPECT_CALL(event_handler, OnData(NotNull(), NotNull()))
.Times(AtLeast(10))
- .WillRepeatedly(CheckCountAndPostQuitTask(&count, 10,
- message_loop_.message_loop_proxy()));
+ .WillRepeatedly(CheckCountAndPostQuitTask(
+ &count, 10, message_loop_.message_loop_proxy()));
// OnError() will be called after the data stream stops while the
// controller is in a recording state.

Powered by Google App Engine
This is Rietveld 408576698