Index: content/test/webrtc_audio_device_test.cc |
=================================================================== |
--- content/test/webrtc_audio_device_test.cc (revision 189965) |
+++ content/test/webrtc_audio_device_test.cc (working copy) |
@@ -42,6 +42,11 @@ |
#include "base/win/scoped_com_initializer.h" |
#endif |
+#if defined(OS_ANDROID) |
+#include "base/android/jni_android.h" |
+#include "media/audio/audio_manager_base.h" |
+#endif |
+ |
using media::AudioParameters; |
using media::ChannelLayout; |
using testing::_; |
@@ -128,6 +133,11 @@ |
WebRTCAudioDeviceTest::~WebRTCAudioDeviceTest() {} |
void WebRTCAudioDeviceTest::SetUp() { |
+#if defined(OS_ANDROID) |
+ media::AudioManagerBase::RegisterAudioManager( |
+ base::android::AttachCurrentThread()); |
+#endif |
+ |
// This part sets up a RenderThread environment to ensure that |
// RenderThread::current() (<=> TLS pointer) is valid. |
// Main parts are inspired by the RenderViewFakeResourcesTest. |