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

Side by Side Diff: chrome/browser/media/webrtc_audio_quality_browsertest.cc

Issue 2043353002: Make fake audio file playback loop by default. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: String handling is hard Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « no previous file | media/audio/fake_audio_input_stream.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <stddef.h> 5 #include <stddef.h>
6 6
7 #include <ctime> 7 #include <ctime>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/files/file_enumerator.h" 10 #include "base/files/file_enumerator.h"
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 // The WebAudio-based tests don't care what devices are available to 141 // The WebAudio-based tests don't care what devices are available to
142 // getUserMedia, and the getUserMedia-based tests will play back a file 142 // getUserMedia, and the getUserMedia-based tests will play back a file
143 // through the fake device using using --use-file-for-fake-audio-capture. 143 // through the fake device using using --use-file-for-fake-audio-capture.
144 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 144 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
145 145
146 // Add loopback interface such that there is always connectivity. 146 // Add loopback interface such that there is always connectivity.
147 command_line->AppendSwitch(switches::kAllowLoopbackInPeerConnection); 147 command_line->AppendSwitch(switches::kAllowLoopbackInPeerConnection);
148 } 148 }
149 149
150 void ConfigureFakeDeviceToPlayFile(const base::FilePath& wav_file_path) { 150 void ConfigureFakeDeviceToPlayFile(const base::FilePath& wav_file_path) {
151 base::CommandLine::ForCurrentProcess()->AppendSwitchPath( 151 base::CommandLine::ForCurrentProcess()->AppendSwitchNative(
152 switches::kUseFileForFakeAudioCapture, wav_file_path); 152 switches::kUseFileForFakeAudioCapture,
153 wav_file_path.value() + FILE_PATH_LITERAL("%noloop"));
153 } 154 }
154 155
155 void AddAudioFileToWebAudio(const std::string& input_file_relative_url, 156 void AddAudioFileToWebAudio(const std::string& input_file_relative_url,
156 content::WebContents* tab_contents) { 157 content::WebContents* tab_contents) {
157 // This calls into webaudio.js. 158 // This calls into webaudio.js.
158 EXPECT_EQ("ok-added", ExecuteJavascript( 159 EXPECT_EQ("ok-added", ExecuteJavascript(
159 "addAudioFile('" + input_file_relative_url + "')", tab_contents)); 160 "addAudioFile('" + input_file_relative_url + "')", tab_contents));
160 } 161 }
161 162
162 void PlayAudioFileThroughWebAudio(content::WebContents* tab_contents) { 163 void PlayAudioFileThroughWebAudio(content::WebContents* tab_contents) {
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
803 } 804 }
804 805
805 // Since the AGC is off here there should be no gain at all. 806 // Since the AGC is off here there should be no gain at all.
806 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, 807 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
807 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) { 808 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) {
808 const char* kAudioCallWithoutAudioProcessing = 809 const char* kAudioCallWithoutAudioProcessing =
809 "{audio: { mandatory: { echoCancellation: false } } }"; 810 "{audio: { mandatory: { echoCancellation: false } } }";
810 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( 811 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
811 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc")); 812 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc"));
812 } 813 }
OLDNEW
« no previous file with comments | « no previous file | media/audio/fake_audio_input_stream.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698