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

Unified Diff: media/audio/audio_output_controller_unittest.cc

Issue 14600025: Replace AudioSilenceDetector with an AudioPowerMonitor. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use CancelableCallback instead of extra-task for close reply. Created 7 years, 5 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_power_monitor.h » ('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 51138b1b8fe4be3e86f3896fde45170ed7c4b8c1..128cc07716f2822767bf4fca70acdb5ee1c3f431 100644
--- a/media/audio/audio_output_controller_unittest.cc
+++ b/media/audio/audio_output_controller_unittest.cc
@@ -40,7 +40,7 @@ class MockAudioOutputControllerEventHandler
MOCK_METHOD0(OnCreated, void());
MOCK_METHOD0(OnPlaying, void());
- MOCK_METHOD1(OnAudible, void(bool is_audible));
+ MOCK_METHOD2(OnPowerMeasured, void(float power_dbfs, bool clipped));
MOCK_METHOD0(OnPaused, void());
MOCK_METHOD0(OnError, void());
MOCK_METHOD2(OnDeviceChange, void(int new_buffer_size, int new_sample_rate));
@@ -131,10 +131,10 @@ class AudioOutputControllerTest : public testing::Test {
void Play() {
// Expect the event handler to receive one OnPlaying() call and one or more
- // OnAudible() calls.
+ // OnPowerMeasured() calls.
EXPECT_CALL(mock_event_handler_, OnPlaying())
.WillOnce(SignalEvent(&play_event_));
- EXPECT_CALL(mock_event_handler_, OnAudible(_))
+ EXPECT_CALL(mock_event_handler_, OnPowerMeasured(_, false))
.Times(AtLeast(1));
// During playback, the mock pretends to provide audio data rendered and
« no previous file with comments | « media/audio/audio_output_controller.cc ('k') | media/audio/audio_power_monitor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698