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

Unified Diff: content/renderer/media/webrtc_audio_device_unittest.cc

Issue 12218036: Enable audio capture on Android (Closed) Base URL: https://src.chromium.org/svn/trunk/src/
Patch Set: rebase Created 7 years, 10 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 | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/webrtc_audio_device_unittest.cc
===================================================================
--- content/renderer/media/webrtc_audio_device_unittest.cc (revision 181934)
+++ content/renderer/media/webrtc_audio_device_unittest.cc (working copy)
@@ -322,7 +322,15 @@
// to send encoded packets to the network. Our main interest here is to ensure
// that the audio capturing starts as it should.
// Disabled when running headless since the bots don't have the required config.
-TEST_F(WebRTCAudioDeviceTest, StartRecording) {
+
+// TODO(leozwang): Because ExternalMediaProcessing is disabled in webrtc,
+// disable this unit test on Android for now.
+#if defined(OS_ANDROID)
+#define MAYBE_StartRecording DISABLED_StartRecording
+#else
+#define MAYBE_StartRecording StartRecording
+#endif
+TEST_F(WebRTCAudioDeviceTest, MAYBE_StartRecording) {
if (!has_input_devices_ || !has_output_devices_) {
LOG(WARNING) << "Missing audio devices.";
return;
@@ -466,7 +474,13 @@
// Disabled when running headless since the bots don't have the required config.
// TODO(henrika): improve quality by using a wideband codec, enabling noise-
// suppressions etc.
-TEST_F(WebRTCAudioDeviceTest, FullDuplexAudioWithAGC) {
+// FullDuplexAudioWithAGC is flaky on Android, disable it for now.
+#if defined(OS_ANDROID)
+#define MAYBE_FullDuplexAudioWithAGC DISABLED_FullDuplexAudioWithAGC
+#else
+#define MAYBE_FullDuplexAudioWithAGC FullDuplexAudioWithAGC
+#endif
+TEST_F(WebRTCAudioDeviceTest, MAYBE_FullDuplexAudioWithAGC) {
if (!has_output_devices_ || !has_input_devices_) {
LOG(WARNING) << "Missing audio devices.";
return;
@@ -505,11 +519,19 @@
ScopedWebRTCPtr<webrtc::VoEAudioProcessing> audio_processing(engine.get());
ASSERT_TRUE(audio_processing.valid());
+#if defined(OS_ANDROID)
+ // On Android, by default AGC is off.
+ bool enabled = true;
+ webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
+ EXPECT_EQ(0, audio_processing->GetAgcStatus(enabled, agc_mode));
+ EXPECT_FALSE(enabled);
+#else
bool enabled = false;
- webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
+ webrtc::AgcModes agc_mode = webrtc::kAgcDefault;
EXPECT_EQ(0, audio_processing->GetAgcStatus(enabled, agc_mode));
EXPECT_TRUE(enabled);
EXPECT_EQ(agc_mode, webrtc::kAgcAdaptiveAnalog);
+#endif
int ch = base->CreateChannel();
EXPECT_NE(-1, ch);
« no previous file with comments | « content/renderer/media/webrtc_audio_capturer.cc ('k') | content/renderer/media/webrtc_audio_renderer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698