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

Unified Diff: media/audio/audio_output_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_output_device.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: media/audio/audio_output_device_unittest.cc
diff --git a/media/audio/audio_output_device_unittest.cc b/media/audio/audio_output_device_unittest.cc
index 44414d4ca68bc9981ae1dc26d39c5e05a3223925..e6ede19a2858597b055ed08bad64238931b68e67 100644
--- a/media/audio/audio_output_device_unittest.cc
+++ b/media/audio/audio_output_device_unittest.cc
@@ -158,6 +158,10 @@ AudioOutputDeviceTest::~AudioOutputDeviceTest() {
}
void AudioOutputDeviceTest::CreateDevice(const std::string& device_id) {
+ // Make sure the previous device is properly cleaned up.
+ if (audio_device_)
+ StopAudioDevice();
+
audio_output_ipc_ = new MockAudioOutputIPC();
audio_device_ = new AudioOutputDevice(
base::WrapUnique(audio_output_ipc_), io_loop_.task_runner(), 0, device_id,
« no previous file with comments | « media/audio/audio_output_device.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698