#include "base/command_line.h"
#include "base/files/file_util.h"
#include "base/strings/stringprintf.h"
#include "base/test/scoped_feature_list.h"
#include "base/threading/platform_thread.h"
#include "build/build_config.h"
#include "build/chromeos_buildflags.h"
#include "content/browser/web_contents/web_contents_impl.h"
#include "content/browser/webrtc/webrtc_content_browsertest_base.h"
#include "content/public/browser/network_service_util.h"
#include "content/public/common/content_switches.h"
#include "content/public/test/browser_test.h"
#include "content/public/test/browser_test_utils.h"
#include "content/public/test/content_browser_test_utils.h"
#include "content/public/test/test_utils.h"
#include "media/audio/audio_manager.h"
#include "media/base/media_switches.h"
#include "media/media_buildflags.h"
#include "net/test/embedded_test_server/embedded_test_server.h"
#include "services/network/public/cpp/features.h"
#include "third_party/blink/public/common/features.h"
#include "third_party/blink/public/common/peerconnection/webrtc_ip_handling_policy.h"
namespace content {
#if BUILDFLAG(IS_ANDROID) && defined(ADDRESS_SANITIZER)
#define MAYBE_WebRtcBrowserTest …
#else
#define MAYBE_WebRtcBrowserTest …
#endif
class MAYBE_WebRtcBrowserTest : public WebRtcContentBrowserTestBase { … };
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CanSetupAudioAndVideoCall) { … }
#if BUILDFLAG(IS_ANDROID) || (BUILDFLAG(IS_LINUX) && defined(ADDRESS_SANITIZER))
#define MAYBE_NetworkProcessCrashRecovery …
#else
#define MAYBE_NetworkProcessCrashRecovery …
#endif
IN_PROC_BROWSER_TEST_F(…) { …
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CanSetupDefaultVideoCallWithOldGetUserMedia) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
DISABLED_CanSetupDefaultVideoCall) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CanSetupVideoCallWith1To1AspectRatio) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
DISABLED_CanSetupVideoCallWith16To9AspectRatio) { … }
#if BUILDFLAG(IS_MAC)
#define MAYBE_CanSetupVideoCallWith4To3AspectRatio …
#else
#define MAYBE_CanSetupVideoCallWith4To3AspectRatio …
#endif
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
MAYBE_CanSetupVideoCallWith4To3AspectRatio) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CanSetupVideoCallAndDisableLocalVideo) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CanSetupCallAndSendDtmf) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CanMakeEmptyCallThenAddStreamsAndRenegotiate) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CanMakeAudioCallAndThenRenegotiateToVideo) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CanForwardRemoteStream) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
NoCrashWhenConnectChromiumSinkToRemoteTrack) { … }
#if defined(THREAD_SANITIZER)
#define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle …
#else
#define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle …
#endif
IN_PROC_BROWSER_TEST_F(…) { …
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
NegotiateUnsupportedVideoCodec) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, NegotiateNonCryptoCall) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, NegotiateOfferWithBLine) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
CallWithNewVideoMediaStream) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, AddTwoMediaStreamsToOnePC) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CreateOfferWithOfferOptions) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, CallInsideIframe) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, SetConfiguration) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, SetConfigurationErrors) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest, ApplyConstraints) { … }
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
GetSettingsReportsValuesForRemoteTracks) { … }
IN_PROC_BROWSER_TEST_F(
MAYBE_WebRtcBrowserTest,
EstablishVideoOnlyCallAndVerifyGetSynchronizationSourcesWorks) { … }
#if BUILDFLAG(IS_ANDROID) && BUILDFLAG(USE_PROPRIETARY_CODECS)
IN_PROC_BROWSER_TEST_F(MAYBE_WebRtcBrowserTest,
DISABLED_CanSetupH264VideoCallOnSupportedDevice) {
MakeTypicalPeerConnectionCall("CanSetupH264VideoCallOnSupportedDevice();");
}
#endif
}