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

Unified Diff: content/browser/media/webrtc_browsertest.cc

Issue 240403003: Adding lenient mode to WebRTC audio tests. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Passing parameter to test instead of global. Created 6 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 | « no previous file | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/media/webrtc_browsertest.cc
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc
index 9f1d522d05212cc0250a75e020b1e4983664814f..d67f17325eedc1deaaaef7c49292f2d2ad62b1b9 100644
--- a/content/browser/media/webrtc_browsertest.cc
+++ b/content/browser/media/webrtc_browsertest.cc
@@ -20,6 +20,14 @@
#include "base/win/windows_version.h"
#endif
+#if defined (OS_ANDROID) || defined(THREAD_SANITIZER)
+// Just do the bare minimum of audio checking on Android and under TSAN since
+// it's a bit sensitive to device performance.
+static const char kUseLenientAudioChecking[] = "true";
+#else
+static const char kUseLenientAudioChecking[] = "false";
+#endif
+
namespace content {
class WebRtcBrowserTest : public WebRtcContentBrowserTest,
@@ -305,16 +313,14 @@ IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
<< "Must run with fake devices since the test will explicitly look "
<< "for the fake device signal.";
- MakeTypicalPeerConnectionCall("callAndEnsureAudioIsPlaying();");
+ MakeTypicalPeerConnectionCall(base::StringPrintf(
+ "callAndEnsureAudioIsPlaying(%s);", kUseLenientAudioChecking));
}
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
EstablishAudioVideoCallAndVerifyMutingWorks) {
if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
- // Bots with no output devices will force the audio code into a different
- // path where it doesn't manage to set either the low or high latency path.
- // This test will compute useless values in that case, so skip running on
- // such bots (see crbug.com/326338).
+ // See comment on EstablishAudioVideoCallAndMeasureOutputLevel.
LOG(INFO) << "Missing output devices: skipping test...";
return;
}
@@ -324,13 +330,14 @@ IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
<< "Must run with fake devices since the test will explicitly look "
<< "for the fake device signal.";
- MakeTypicalPeerConnectionCall("callAndEnsureAudioTrackMutingWorks();");
+ MakeTypicalPeerConnectionCall(base::StringPrintf(
+ "callAndEnsureAudioTrackMutingWorks(%s);", kUseLenientAudioChecking));
}
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
EstablishAudioVideoCallAndVerifyUnmutingWorks) {
if (!media::AudioManager::Get()->HasAudioOutputDevices()) {
- // See comment on EstablishAudioVideoCallAndVerifyMutingWorks.
+ // See comment on EstablishAudioVideoCallAndMeasureOutputLevel.
LOG(INFO) << "Missing output devices: skipping test...";
return;
}
@@ -340,7 +347,8 @@ IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest,
<< "Must run with fake devices since the test will explicitly look "
<< "for the fake device signal.";
- MakeTypicalPeerConnectionCall("callAndEnsureAudioTrackUnmutingWorks();");
+ MakeTypicalPeerConnectionCall(base::StringPrintf(
+ "callAndEnsureAudioTrackUnmutingWorks(%s);", kUseLenientAudioChecking));
}
IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) {
« no previous file with comments | « no previous file | content/test/data/media/peerconnection-call.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698