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

Unified Diff: media/audio/audio_input_device_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_device_unittest.cc
diff --git a/media/audio/audio_input_device_unittest.cc b/media/audio/audio_input_device_unittest.cc
index 046d2eb888c533385ea1903e322838be96d43b48..94976a217b86932e1e933cf0e54d89b9b5ae1c46 100644
--- a/media/audio/audio_input_device_unittest.cc
+++ b/media/audio/audio_input_device_unittest.cc
@@ -64,8 +64,8 @@ TEST(AudioInputDeviceTest, Noop) {
new AudioInputDevice(base::WrapUnique(input_ipc), io_loop.task_runner()));
}
-ACTION_P2(ReportStateChange, device, state) {
- static_cast<AudioInputIPCDelegate*>(device)->OnStateChanged(state);
+ACTION_P(ReportStateChange, device) {
+ static_cast<AudioInputIPCDelegate*>(device)->OnError();
}
// Verify that we get an OnCaptureError() callback if CreateStream fails.
@@ -81,8 +81,7 @@ TEST(AudioInputDeviceTest, FailToCreateStream) {
device->Initialize(params, &callback, 1);
device->Start();
EXPECT_CALL(*input_ipc, CreateStream(_, _, _, _, _))
- .WillOnce(ReportStateChange(device.get(),
- AUDIO_INPUT_IPC_DELEGATE_STATE_ERROR));
+ .WillOnce(ReportStateChange(device.get()));
EXPECT_CALL(callback, OnCaptureError(_))
.WillOnce(QuitLoop(io_loop.task_runner()));
base::RunLoop().Run();

Powered by Google App Engine
This is Rietveld 408576698