Commit e93ca496 authored by emircan's avatar emircan Committed by Commit bot

Allow IO thread usage in WebRTC browsertests

BUG=684680
NOPRESUBMIT=true

Review-Url: https://codereview.chromium.org/2840333004
Cr-Commit-Position: refs/heads/master@{#467577}
parent 15eb928d
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
#include "base/path_service.h" #include "base/path_service.h"
#include "base/process/launch.h" #include "base/process/launch.h"
#include "base/rand_util.h" #include "base/rand_util.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/infobars/infobar_responder.h" #include "chrome/browser/infobars/infobar_responder.h"
...@@ -232,6 +233,7 @@ class WebRtcApprtcBrowserTest : public WebRtcTestBase { ...@@ -232,6 +233,7 @@ class WebRtcApprtcBrowserTest : public WebRtcTestBase {
}; };
IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) { IN_PROC_BROWSER_TEST_F(WebRtcApprtcBrowserTest, MANUAL_WorksOnApprtc) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
DetectErrorsInJavaScript(); DetectErrorsInJavaScript();
ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999")); ASSERT_TRUE(LaunchApprtcInstanceOnLocalhost("9999"));
ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089")); ASSERT_TRUE(LaunchColliderOnLocalHost("http://localhost:9999", "8089"));
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#include "base/strings/string_util.h" #include "base/strings/string_util.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/threading/thread_restrictions.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_audio.h" #include "chrome/browser/media/webrtc/webrtc_browsertest_audio.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
...@@ -681,11 +682,13 @@ void MAYBE_WebRtcAudioQualityBrowserTest::TestWithFakeDeviceGetUserMedia( ...@@ -681,11 +682,13 @@ void MAYBE_WebRtcAudioQualityBrowserTest::TestWithFakeDeviceGetUserMedia(
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
MANUAL_TestCallQualityWithAudioFromFakeDevice) { MANUAL_TestCallQualityWithAudioFromFakeDevice) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
TestWithFakeDeviceGetUserMedia(kAudioOnlyCallConstraints, "_getusermedia"); TestWithFakeDeviceGetUserMedia(kAudioOnlyCallConstraints, "_getusermedia");
} }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
MANUAL_TestCallQualityWithAudioFromWebAudio) { MANUAL_TestCallQualityWithAudioFromWebAudio) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
if (OnWin8()) { if (OnWin8()) {
// http://crbug.com/379798. // http://crbug.com/379798.
LOG(ERROR) << "This test is not implemented for Windows XP/Win8."; LOG(ERROR) << "This test is not implemented for Windows XP/Win8.";
...@@ -801,6 +804,7 @@ void MAYBE_WebRtcAudioQualityBrowserTest::TestAutoGainControl( ...@@ -801,6 +804,7 @@ void MAYBE_WebRtcAudioQualityBrowserTest::TestAutoGainControl(
// The AGC should apply non-zero gain here. // The AGC should apply non-zero gain here.
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
MANUAL_TestAutoGainControlOnLowAudio) { MANUAL_TestAutoGainControlOnLowAudio) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
kReferenceFile, kAudioOnlyCallConstraints, "_with_agc")); kReferenceFile, kAudioOnlyCallConstraints, "_with_agc"));
} }
...@@ -808,6 +812,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, ...@@ -808,6 +812,7 @@ IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
// Since the AGC is off here there should be no gain at all. // Since the AGC is off here there should be no gain at all.
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest, IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcAudioQualityBrowserTest,
MANUAL_TestAutoGainIsOffWithAudioProcessingOff) { MANUAL_TestAutoGainIsOffWithAudioProcessingOff) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
const char* kAudioCallWithoutAudioProcessing = const char* kAudioCallWithoutAudioProcessing =
"{audio: { mandatory: { echoCancellation: false } } }"; "{audio: { mandatory: { echoCancellation: false } } }";
ASSERT_NO_FATAL_FAILURE(TestAutoGainControl( ASSERT_NO_FATAL_FAILURE(TestAutoGainControl(
......
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
#include "base/macros.h" #include "base/macros.h"
#include "base/strings/string_split.h" #include "base/strings/string_split.h"
#include "base/test/test_timeouts.h" #include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/browser_process.h" #include "chrome/browser/browser_process.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
...@@ -226,12 +227,14 @@ class WebRtcInternalsPerfBrowserTest : public WebRtcTestBase { ...@@ -226,12 +227,14 @@ class WebRtcInternalsPerfBrowserTest : public WebRtcTestBase {
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcInternalsPerfBrowserTest, WebRtcInternalsPerfBrowserTest,
MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) { MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp8) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8"); RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP8");
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcInternalsPerfBrowserTest, WebRtcInternalsPerfBrowserTest,
MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) { MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsVp9) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9"); RunsAudioVideoCall60SecsAndLogsInternalMetrics("VP9");
} }
...@@ -248,6 +251,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -248,6 +251,7 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcInternalsPerfBrowserTest, WebRtcInternalsPerfBrowserTest,
MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) { MAYBE_MANUAL_RunsAudioVideoCall60SecsAndLogsInternalMetricsH264) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
// Only run test if run-time feature corresponding to |rtc_use_h264| is on. // Only run test if run-time feature corresponding to |rtc_use_h264| is on.
if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) {
LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. "
...@@ -264,11 +268,13 @@ IN_PROC_BROWSER_TEST_F( ...@@ -264,11 +268,13 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcInternalsPerfBrowserTest, WebRtcInternalsPerfBrowserTest,
MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) { MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsDefault) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsOneWayCall60SecsAndLogsInternalMetrics("", false); RunsOneWayCall60SecsAndLogsInternalMetrics("", false);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcInternalsPerfBrowserTest, WebRtcInternalsPerfBrowserTest,
MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) { MANUAL_RunsOneWayCall60SecsAndLogsInternalMetricsWithOpusDtx) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsOneWayCall60SecsAndLogsInternalMetrics("", true); RunsOneWayCall60SecsAndLogsInternalMetrics("", true);
} }
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "base/command_line.h" #include "base/command_line.h"
#include "base/test/test_timeouts.h" #include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "chrome/browser/media/webrtc/test_stats_dictionary.h" #include "chrome/browser/media/webrtc/test_stats_dictionary.h"
#include "chrome/browser/media/webrtc/webrtc_browsertest_base.h" #include "chrome/browser/media/webrtc/webrtc_browsertest_base.h"
...@@ -232,42 +233,49 @@ class WebRtcStatsPerfBrowserTest : public WebRtcTestBase { ...@@ -232,42 +233,49 @@ class WebRtcStatsPerfBrowserTest : public WebRtcTestBase {
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_opus) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_opus) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics("opus", kUseDefaultVideoCodec); RunsAudioAndVideoCallCollectingMetrics("opus", kUseDefaultVideoCodec);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_ISAC) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_ISAC) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics("ISAC", kUseDefaultVideoCodec); RunsAudioAndVideoCallCollectingMetrics("ISAC", kUseDefaultVideoCodec);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_G722) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_G722) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics("G722", kUseDefaultVideoCodec); RunsAudioAndVideoCallCollectingMetrics("G722", kUseDefaultVideoCodec);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMU) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMU) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics("PCMU", kUseDefaultVideoCodec); RunsAudioAndVideoCallCollectingMetrics("PCMU", kUseDefaultVideoCodec);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMA) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_AudioCodec_PCMA) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics("PCMA", kUseDefaultVideoCodec); RunsAudioAndVideoCallCollectingMetrics("PCMA", kUseDefaultVideoCodec);
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP8) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP8) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP8"); RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP8");
} }
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP9) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_VP9) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP9"); RunsAudioAndVideoCallCollectingMetrics(kUseDefaultAudioCodec, "VP9");
} }
...@@ -276,6 +284,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -276,6 +284,7 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264) { MANUAL_RunsAudioAndVideoCallCollectingMetrics_VideoCodec_H264) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
// Only run test if run-time feature corresponding to |rtc_use_h264| is on. // Only run test if run-time feature corresponding to |rtc_use_h264| is on.
if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) {
LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. "
...@@ -292,6 +301,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -292,6 +301,7 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Promise) { MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Promise) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallMeasuringGetStatsPerformance( RunsAudioAndVideoCallMeasuringGetStatsPerformance(
GetStatsVariation::PROMISE_BASED); GetStatsVariation::PROMISE_BASED);
} }
...@@ -299,6 +309,7 @@ IN_PROC_BROWSER_TEST_F( ...@@ -299,6 +309,7 @@ IN_PROC_BROWSER_TEST_F(
IN_PROC_BROWSER_TEST_F( IN_PROC_BROWSER_TEST_F(
WebRtcStatsPerfBrowserTest, WebRtcStatsPerfBrowserTest,
MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Callback) { MANUAL_RunsAudioAndVideoCallMeasuringGetStatsPerformance_Callback) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
RunsAudioAndVideoCallMeasuringGetStatsPerformance( RunsAudioAndVideoCallMeasuringGetStatsPerformance(
GetStatsVariation::CALLBACK_BASED); GetStatsVariation::CALLBACK_BASED);
} }
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#include "base/strings/string_split.h" #include "base/strings/string_split.h"
#include "base/strings/stringprintf.h" #include "base/strings/stringprintf.h"
#include "base/test/test_timeouts.h" #include "base/test/test_timeouts.h"
#include "base/threading/thread_restrictions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "build/build_config.h" #include "build/build_config.h"
#include "chrome/browser/chrome_notification_types.h" #include "chrome/browser/chrome_notification_types.h"
...@@ -344,11 +345,13 @@ INSTANTIATE_TEST_CASE_P( ...@@ -344,11 +345,13 @@ INSTANTIATE_TEST_CASE_P(
IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
MANUAL_TestVideoQualityVp8) { MANUAL_TestVideoQualityVp8) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
TestVideoQuality("VP8"); TestVideoQuality("VP8");
} }
IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
MANUAL_TestVideoQualityVp9) { MANUAL_TestVideoQualityVp9) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
TestVideoQuality("VP9"); TestVideoQuality("VP9");
} }
...@@ -356,6 +359,7 @@ IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, ...@@ -356,6 +359,7 @@ IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest, IN_PROC_BROWSER_TEST_P(WebRtcVideoQualityBrowserTest,
MANUAL_TestVideoQualityH264) { MANUAL_TestVideoQualityH264) {
base::ThreadRestrictions::ScopedAllowIO allow_io;
// Only run test if run-time feature corresponding to |rtc_use_h264| is on. // Only run test if run-time feature corresponding to |rtc_use_h264| is on.
if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) { if (!base::FeatureList::IsEnabled(content::kWebRtcH264WithOpenH264FFmpeg)) {
LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. " LOG(WARNING) << "Run-time feature WebRTC-H264WithOpenH264FFmpeg disabled. "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment