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

Unified Diff: media/audio/win/audio_output_win_unittest.cc

Issue 8591028: Change the way we are sending audio data to driver when using WaveOut API. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 1 month 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/win/audio_output_win_unittest.cc
===================================================================
--- media/audio/win/audio_output_win_unittest.cc (revision 111710)
+++ media/audio/win/audio_output_win_unittest.cc (working copy)
@@ -587,8 +587,9 @@
// We expect the amount of pending bytes will reaching 2 times of
// |bytes_100_ms| because the audio output stream has a triple buffer scheme.
- // And then we will try to provide zero data so the amount of pending bytes
- // will go down and eventually read zero.
+ // From that it would decrease as we are playing the data but not providing
+ // new one. And then we will try to provide zero data so the amount of
+ // pending bytes will go down and eventually read zero.
InSequence s;
EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes, 0)))
@@ -604,11 +605,13 @@
EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
2 * bytes_100_ms)))
- .WillOnce(Return(0));
+ .Times(AnyNumber())
+ .WillRepeatedly(Return(0));
EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes,
bytes_100_ms)))
- .WillOnce(Return(0));
+ .Times(AnyNumber())
+ .WillRepeatedly(Return(0));
EXPECT_CALL(source, OnMoreData(oas, NotNull(), bytes_100_ms,
Field(&AudioBuffersState::pending_bytes, 0)))
.Times(AnyNumber())

Powered by Google App Engine
This is Rietveld 408576698