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

Unified Diff: media/audio/audio_manager_unittest.cc

Issue 144613003: Remove use of CoreAudioUtil::IsSupported() from AudioManager startup. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix tests. Created 6 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_manager_unittest.cc
diff --git a/media/audio/audio_manager_unittest.cc b/media/audio/audio_manager_unittest.cc
index 8c6cc10b4234263bacac1e3e6911d9cd78d19a92..7e5895fade4ffabbd795a39ef5911b8d8229881b 100644
--- a/media/audio/audio_manager_unittest.cc
+++ b/media/audio/audio_manager_unittest.cc
@@ -5,6 +5,7 @@
#include "base/environment.h"
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
+#include "base/synchronization/waitable_event.h"
#include "media/audio/audio_manager.h"
#include "media/audio/audio_manager_base.h"
#include "media/audio/fake_audio_log_factory.h"
@@ -37,6 +38,12 @@ class AudioManagerTest
, com_init_(base::win::ScopedCOMInitializer::kMTA)
#endif
{
+ // Wait for audio thread initialization to complete. Otherwise the
+ // enumeration type may not have been set yet.
+ base::WaitableEvent event(false, false);
+ audio_manager_->GetTaskRunner()->PostTask(FROM_HERE, base::Bind(
+ &base::WaitableEvent::Signal, base::Unretained(&event)));
+ event.Wait();
}
#if defined(OS_WIN)
« no previous file with comments | « content/browser/renderer_host/media/audio_input_device_manager_unittest.cc ('k') | media/audio/win/audio_manager_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698