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

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

Issue 1381703006: Fix a test failure when IP Permission check is turned on (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | no next file » | 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 <ctime> 5 #include <ctime>
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/files/file_enumerator.h" 8 #include "base/files/file_enumerator.h"
9 #include "base/files/file_util.h" 9 #include "base/files/file_util.h"
10 #include "base/files/scoped_temp_dir.h" 10 #include "base/files/scoped_temp_dir.h"
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 } 130 }
131 131
132 void SetUpCommandLine(base::CommandLine* command_line) override { 132 void SetUpCommandLine(base::CommandLine* command_line) override {
133 EXPECT_FALSE(command_line->HasSwitch( 133 EXPECT_FALSE(command_line->HasSwitch(
134 switches::kUseFakeUIForMediaStream)); 134 switches::kUseFakeUIForMediaStream));
135 135
136 // The WebAudio-based tests don't care what devices are available to 136 // The WebAudio-based tests don't care what devices are available to
137 // getUserMedia, and the getUserMedia-based tests will play back a file 137 // getUserMedia, and the getUserMedia-based tests will play back a file
138 // through the fake device using using --use-file-for-fake-audio-capture. 138 // through the fake device using using --use-file-for-fake-audio-capture.
139 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream); 139 command_line->AppendSwitch(switches::kUseFakeDeviceForMediaStream);
140
141 // Add loopback interface such that there is always connectivity.
142 command_line->AppendSwitch(switches::kAllowLoopbackInPeerConnection);
140 } 143 }
141 144
142 void ConfigureFakeDeviceToPlayFile(const base::FilePath& wav_file_path) { 145 void ConfigureFakeDeviceToPlayFile(const base::FilePath& wav_file_path) {
143 base::CommandLine::ForCurrentProcess()->AppendSwitchPath( 146 base::CommandLine::ForCurrentProcess()->AppendSwitchPath(
144 switches::kUseFileForFakeAudioCapture, wav_file_path); 147 switches::kUseFileForFakeAudioCapture, wav_file_path);
145 } 148 }
146 149
147 void AddAudioFileToWebAudio(const std::string& input_file_relative_url, 150 void AddAudioFileToWebAudio(const std::string& input_file_relative_url,
148 content::WebContents* tab_contents) { 151 content::WebContents* tab_contents) {
149 // This calls into webaudio.js. 152 // This calls into webaudio.js.
(...skipping 645 matching lines...) Expand 10 before | Expand all | Expand 10 after
795 } 798 }
796 799
797 // Since the AGC is off here there should be no gain at all. 800 // Since the AGC is off here there should be no gain at all.
798 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, 801 IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
799 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) { 802 MANUAL_TestAutoGainIsOffWithAudioProcessingOff) {
800 const char* kAudioCallWithoutAudioProcessing = 803 const char* kAudioCallWithoutAudioProcessing =
801 "{audio: { mandatory: { echoCancellation: false } } }"; 804 "{audio: { mandatory: { echoCancellation: false } } }";
802 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( 805 ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
803 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc")); 806 kReferenceFile, kAudioCallWithoutAudioProcessing, "_no_agc"));
804 } 807 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698