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 27d7b0f95c5a578177d900c23d81c0e86f394d58..1569c566afeabbf02b44769b2f4a51b6f05bd377 100644 |
--- a/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc |
+++ b/chrome/browser/media/chrome_webrtc_audio_quality_browsertest.cc |
@@ -89,8 +89,11 @@ static base::FilePath GetTestDataDir() { |
// 50 / 100 in level. Also go into the playback tab, right-click Speakers, |
// and set that level to 50 / 100. Otherwise you will get distortion in |
// the recording. |
-class WebRtcAudioQualityBrowserTest : public WebRtcTestBase { |
+class WebRtcAudioQualityBrowserTest : public WebRtcTestBase, |
+ public testing::WithParamInterface<bool> { |
public: |
+ WebRtcAudioQualityBrowserTest() : enable_audio_track_processing_(GetParam()) { |
phoglund_chromium
2014/03/13 09:04:49
It's not necessary to store this as a member varia
no longer working on chromium
2014/03/13 09:58:08
Done.
|
+ } |
virtual void SetUpInProcessBrowserTestFixture() OVERRIDE { |
PeerConnectionServerRunner::KillAllPeerConnectionServersOnCurrentSystem(); |
DetectErrorsInJavaScript(); // Look for errors in our rather complex js. |
@@ -103,6 +106,9 @@ class WebRtcAudioQualityBrowserTest : public WebRtcTestBase { |
switches::kUseFakeDeviceForMediaStream)); |
EXPECT_FALSE(command_line->HasSwitch( |
switches::kUseFakeUIForMediaStream)); |
+ if (enable_audio_track_processing_) { |
+ command_line->AppendSwitch(switches::kEnableAudioTrackProcessing); |
+ } |
} |
bool HasAllRequiredResources() { |
@@ -147,6 +153,7 @@ class WebRtcAudioQualityBrowserTest : public WebRtcTestBase { |
} |
PeerConnectionServerRunner peerconnection_server_; |
+ bool enable_audio_track_processing_; |
}; |
class AudioRecorder { |
@@ -361,6 +368,11 @@ bool RunPesq(const base::FilePath& reference_file, |
return true; |
} |
+static const bool kRunTestsWithFlag[] = { false, true }; |
+INSTANTIATE_TEST_CASE_P(WebRtcAudioQualityBrowserTests, |
+ WebRtcAudioQualityBrowserTest, |
+ testing::ValuesIn(kRunTestsWithFlag)); |
+ |
// Should be enabled for Linux, but is flaky. http://crbug.com/340197. |
#if defined(OS_WIN) |
// Only implemented on Linux and Windows for now. |
@@ -369,7 +381,7 @@ bool RunPesq(const base::FilePath& reference_file, |
#define MAYBE_MANUAL_TestAudioQuality DISABLED_MANUAL_TestAudioQuality |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcAudioQualityBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcAudioQualityBrowserTest, |
MAYBE_MANUAL_TestAudioQuality) { |
#if defined(OS_WIN) |
if (base::win::GetVersion() < base::win::VERSION_VISTA) { |