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

Unified Diff: media/audio/audio_input_controller_unittest.cc

Issue 2582533002: Simplify AudioInputRendererHost IPC interface. (Closed)
Patch Set: Rebase. Created 3 years, 11 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 6b98fb3681ef57356e5b5dd76f3cc75e86143b01..6d44002e817d1fba3b08b5d5051a28017f1f995e 100644
--- a/media/audio/audio_input_controller_unittest.cc
+++ b/media/audio/audio_input_controller_unittest.cc
@@ -51,7 +51,6 @@ class MockAudioInputControllerEventHandler
MockAudioInputControllerEventHandler() {}
MOCK_METHOD1(OnCreated, void(AudioInputController* controller));
- MOCK_METHOD1(OnRecording, void(AudioInputController* controller));
MOCK_METHOD2(OnError, void(AudioInputController* controller,
AudioInputController::ErrorCode error_code));
MOCK_METHOD2(OnData,
@@ -120,10 +119,6 @@ TEST_F(AudioInputControllerTest, RecordAndClose) {
EXPECT_CALL(event_handler, OnCreated(NotNull()))
.Times(Exactly(1));
- // OnRecording() will be called only once.
- EXPECT_CALL(event_handler, OnRecording(NotNull()))
- .Times(Exactly(1));
-
// OnData() shall be called ten times.
EXPECT_CALL(event_handler, OnData(NotNull(), NotNull()))
.Times(AtLeast(10))
@@ -139,7 +134,6 @@ TEST_F(AudioInputControllerTest, RecordAndClose) {
AudioDeviceDescription::kDefaultDeviceId, NULL);
ASSERT_TRUE(controller.get());
- // Start recording and trigger one OnRecording() call.
controller->Record();
// Record and wait until ten OnData() callbacks are received.
@@ -173,13 +167,9 @@ TEST_F(AudioInputControllerTest, SamplesPerPacketTooLarge) {
TEST_F(AudioInputControllerTest, CloseTwice) {
MockAudioInputControllerEventHandler event_handler;
- // OnRecording() will be called only once.
+ // OnCreated() will be called only once.
EXPECT_CALL(event_handler, OnCreated(NotNull()));
- // OnRecording() will be called only once.
- EXPECT_CALL(event_handler, OnRecording(NotNull()))
- .Times(Exactly(1));
-
AudioParameters params(AudioParameters::AUDIO_FAKE,
kChannelLayout,
kSampleRate,

Powered by Google App Engine
This is Rietveld 408576698