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

Unified Diff: media/audio/audio_output_proxy_unittest.cc

Issue 10268026: Fix test. (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: Created 8 years, 8 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 | « no previous file | tools/valgrind/drmemory/suppressions_full.txt » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_proxy_unittest.cc
===================================================================
--- media/audio/audio_output_proxy_unittest.cc (revision 134713)
+++ media/audio/audio_output_proxy_unittest.cc (working copy)
@@ -16,9 +16,12 @@
using ::testing::_;
using ::testing::AllOf;
+using ::testing::DoAll;
using ::testing::Field;
using ::testing::Mock;
+using ::testing::NotNull;
using ::testing::Return;
+using ::testing::SetArrayArgument;
using media::AudioBuffersState;
using media::AudioInputStream;
using media::AudioManager;
@@ -462,25 +465,29 @@
EXPECT_TRUE(proxy2->Open());
proxy1->Start(&callback_);
+ uint8 zeroes[4] = {0, 0, 0, 0};
uint8 buf1[4] = {0};
EXPECT_CALL(callback_,
- OnMoreData(_, 4,
+ OnMoreData(NotNull(), 4,
AllOf(Field(&AudioBuffersState::pending_bytes, 0),
Field(&AudioBuffersState::hardware_delay_bytes, 0))))
- .WillOnce(Return(4));
+ .WillOnce(DoAll(SetArrayArgument<0>(zeroes, zeroes + sizeof(zeroes)),
+ Return(4)));
mixer_->OnMoreData(buf1, sizeof(buf1), AudioBuffersState(0, 0));
proxy2->Start(&callback_);
uint8 buf2[4] = {0};
EXPECT_CALL(callback_,
- OnMoreData(_, 4,
+ OnMoreData(NotNull(), 4,
AllOf(Field(&AudioBuffersState::pending_bytes, 4),
Field(&AudioBuffersState::hardware_delay_bytes, 0))))
- .WillOnce(Return(4));
+ .WillOnce(DoAll(SetArrayArgument<0>(zeroes, zeroes + sizeof(zeroes)),
+ Return(4)));
EXPECT_CALL(callback_,
- OnMoreData(_, 4,
+ OnMoreData(NotNull(), 4,
AllOf(Field(&AudioBuffersState::pending_bytes, 0),
Field(&AudioBuffersState::hardware_delay_bytes, 0))))
- .WillOnce(Return(4));
+ .WillOnce(DoAll(SetArrayArgument<0>(zeroes, zeroes + sizeof(zeroes)),
+ Return(4)));
mixer_->OnMoreData(buf2, sizeof(buf2), AudioBuffersState(4, 0));
proxy1->Stop();
proxy2->Stop();
« no previous file with comments | « no previous file | tools/valgrind/drmemory/suppressions_full.txt » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698