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

Unified Diff: media/audio/audio_output_controller_unittest.cc

Issue 16103007: Privitize WaitTillDataReady() and DataReady(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Gotta catch'em all! Created 7 years, 7 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
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_controller_unittest.cc
diff --git a/media/audio/audio_output_controller_unittest.cc b/media/audio/audio_output_controller_unittest.cc
index c2630b0e105eb574896324e355292dcafc26de1f..ab4f6521300a45af708bca8cee9c83e0688ef056 100644
--- a/media/audio/audio_output_controller_unittest.cc
+++ b/media/audio/audio_output_controller_unittest.cc
@@ -55,9 +55,8 @@ class MockAudioOutputControllerSyncReader
MockAudioOutputControllerSyncReader() {}
MOCK_METHOD1(UpdatePendingBytes, void(uint32 bytes));
- MOCK_METHOD2(Read, int(AudioBus* source, AudioBus* dest));
+ MOCK_METHOD3(Read, int(bool block, const AudioBus* source, AudioBus* dest));
MOCK_METHOD0(Close, void());
- MOCK_METHOD0(DataReady, bool());
private:
DISALLOW_COPY_AND_ASSIGN(MockAudioOutputControllerSyncReader);
@@ -86,10 +85,10 @@ ACTION_P(SignalEvent, event) {
static const float kBufferNonZeroData = 1.0f;
ACTION(PopulateBuffer) {
- arg1->Zero();
+ arg2->Zero();
// Note: To confirm the buffer will be populated in these tests, it's
// sufficient that only the first float in channel 0 is set to the value.
- arg1->channel(0)[0] = kBufferNonZeroData;
+ arg2->channel(0)[0] = kBufferNonZeroData;
}
class AudioOutputControllerTest : public testing::Test {
@@ -142,13 +141,10 @@ class AudioOutputControllerTest : public testing::Test {
// sent from the render process.
EXPECT_CALL(mock_sync_reader_, UpdatePendingBytes(_))
.Times(AtLeast(1));
- EXPECT_CALL(mock_sync_reader_, Read(_, _))
+ EXPECT_CALL(mock_sync_reader_, Read(_, _, _))
.WillRepeatedly(DoAll(PopulateBuffer(),
SignalEvent(&read_event_),
Return(params_.frames_per_buffer())));
- EXPECT_CALL(mock_sync_reader_, DataReady())
- .WillRepeatedly(Return(true));
-
controller_->Play();
}
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_output_resampler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698