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

Unified Diff: chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc

Issue 934793002: Made WebRTC AQ test two-way, adjusted volume on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@threading_fake_device
Patch Set: Also re-enabling test on mac (since this patch fixes that test) Created 5 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 | « no previous file | chrome/test/data/webrtc/peerconnection.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc
diff --git a/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc b/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc
index cf559b5a2e4fc38fcf2b608acebf5df5912bcdd4..7b9a0f95be7a71044084197ded750fc40cc991df 100644
--- a/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc
+++ b/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc
@@ -155,6 +155,12 @@ class MAYBE_WebRtcAudioQualityBrowserTest : public WebRtcTestBase {
return tab;
}
+ void MuteMediaElement(const std::string& element_id,
+ content::WebContents* tab_contents) {
+ EXPECT_EQ("ok-muted", ExecuteJavascript(
+ "setMediaElementMuted('" + element_id + "', true)", tab_contents));
+ }
+
protected:
void TestAutoGainControl(const base::FilePath::StringType& reference_filename,
const std::string& constraints,
@@ -266,7 +272,7 @@ bool ForceMicrophoneVolumeTo100Percent() {
command_line.AppendArg("-e");
command_line.AppendArg("set volume input volume 100");
command_line.AppendArg("-e");
- command_line.AppendArg("set volume output volume 100");
+ command_line.AppendArg("set volume output volume 85");
std::string result;
if (!base::GetAppOutput(command_line, &result)) {
@@ -565,7 +571,7 @@ void ComputeAndPrintPesqResults(const base::FilePath& reference_file,
} // namespace
-// Sets up a one-way WebRTC call and records its output to |recording|, using
+// Sets up a two-way WebRTC call and records its output to |recording|, using
// getUserMedia.
//
// |reference_file| should have at least two seconds of silence in the
@@ -587,14 +593,17 @@ void MAYBE_WebRtcAudioQualityBrowserTest::SetupAndRecordAudioCall(
ConfigureFakeDeviceToPlayFile(reference_file);
- // Create a one-way call.
+ // Create a two-way call. Mute one of the receivers though; that way it will
+ // be receiving audio bytes, but we will not be playing out of both elements.
GURL test_page = embedded_test_server()->GetURL(kWebRtcAudioTestHtmlPage);
content::WebContents* left_tab =
OpenPageAndGetUserMediaInNewTabWithConstraints(test_page, constraints);
SetupPeerconnectionWithLocalStream(left_tab);
+ MuteMediaElement("remote-view", left_tab);
content::WebContents* right_tab =
- OpenPageWithoutGetUserMedia(kWebRtcAudioTestHtmlPage);
+ OpenPageAndGetUserMediaInNewTabWithConstraints(test_page, constraints);
+ SetupPeerconnectionWithLocalStream(right_tab);
AudioRecorder recorder;
ASSERT_TRUE(recorder.StartRecording(recording_time, recording));
@@ -607,17 +616,8 @@ void MAYBE_WebRtcAudioQualityBrowserTest::SetupAndRecordAudioCall(
HangUp(left_tab);
}
-#if defined(OS_MACOSX)
-// Broken on Mac for some reason: http://crbug.com/446859.
-#define MAYBE_MANUAL_TestCallQualityWithAudioFromFakeDevice \
- DISABLED_MANUAL_TestCallQualityWithAudioFromFakeDevice
-#else
-#define MAYBE_MANUAL_TestCallQualityWithAudioFromFakeDevice \
- MANUAL_TestCallQualityWithAudioFromFakeDevice
-#endif
-
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
- MAYBE_MANUAL_TestCallQualityWithAudioFromFakeDevice) {
+ MANUAL_TestCallQualityWithAudioFromFakeDevice) {
if (OnWinXp() || OnWin8()) {
// http://crbug.com/379798.
LOG(ERROR) << "This test is not implemented for Windows XP/Win8.";
« no previous file with comments | « no previous file | chrome/test/data/webrtc/peerconnection.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698