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

Unified Diff: media/audio/audio_input_device_unittest.cc

Issue 2828233002: DCHECK that audio devices are stopped prior to destruction. (Closed)
Patch Set: More DCHECKs! Created 3 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 | « media/audio/audio_input_device.cc ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 eb144c6a4bf4346ef16e1e48b968bb127f56a5b1..28e9efce6c491e3821b5e87e372e2eaccbae1796 100644
--- a/media/audio/audio_input_device_unittest.cc
+++ b/media/audio/audio_input_device_unittest.cc
@@ -93,6 +93,8 @@ TEST(AudioInputDeviceTest, FailToCreateStream) {
EXPECT_CALL(callback, OnCaptureError(_))
.WillOnce(QuitLoop(io_loop.task_runner()));
base::RunLoop().Run();
+ device->Stop();
+ base::RunLoop().RunUntilIdle();
}
ACTION_P5(ReportOnStreamCreated, device, handle, socket, length, segments) {
@@ -139,5 +141,8 @@ TEST(AudioInputDeviceTest, CreateStream) {
EXPECT_CALL(callback, OnCaptureStarted())
.WillOnce(QuitLoop(io_loop.task_runner()));
base::RunLoop().Run();
+ device->Stop();
+ base::RunLoop().RunUntilIdle();
}
+
} // namespace media.
« no previous file with comments | « media/audio/audio_input_device.cc ('k') | media/audio/audio_output_device.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698