Index: content/test/webrtc_audio_device_test.cc |
=================================================================== |
--- content/test/webrtc_audio_device_test.cc (revision 190471) |
+++ content/test/webrtc_audio_device_test.cc (working copy) |
@@ -40,6 +40,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 testing::_; |
using testing::InvokeWithoutArgs; |
using testing::Return; |
@@ -124,6 +129,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. |