| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |