Index: content/browser/media/webrtc_browsertest.cc |
diff --git a/content/browser/media/webrtc_browsertest.cc b/content/browser/media/webrtc_browsertest.cc |
index 7f5b038c0b772f6ee2425145ccb15a4be2ff4cd8..eea1d838f6dd0b5d6620a31578d796a68c94a20f 100644 |
--- a/content/browser/media/webrtc_browsertest.cc |
+++ b/content/browser/media/webrtc_browsertest.cc |
@@ -22,9 +22,15 @@ |
namespace content { |
-class WebRtcBrowserTest : public WebRtcContentBrowserTest { |
+class WebRtcBrowserTest : public WebRtcContentBrowserTest, |
+ public testing::WithParamInterface<bool> { |
public: |
- WebRtcBrowserTest() {} |
+ WebRtcBrowserTest() { |
+ if (GetParam()) { |
phoglund_chromium
2014/03/12 17:27:18
And here. Be careful though, it's possible the bas
no longer working on chromium
2014/03/12 18:06:08
Well, lets not make the test code more complicated
|
+ CommandLine::ForCurrentProcess()->AppendSwitch( |
+ switches::kEnableAudioTrackProcessing); |
+ } |
+ } |
virtual ~WebRtcBrowserTest() {} |
// Convenience function since most peerconnection-call.html tests just load |
@@ -48,6 +54,11 @@ class WebRtcBrowserTest : public WebRtcContentBrowserTest { |
} |
}; |
+static const bool kRunTestsWithFlag[] = { false, true }; |
+INSTANTIATE_TEST_CASE_P(WebRtcBrowserTests, |
+ WebRtcBrowserTest, |
+ testing::ValuesIn(kRunTestsWithFlag)); |
+ |
#if defined(OS_LINUX) && !defined(OS_CHROMEOS) && defined(ARCH_CPU_ARM_FAMILY) |
// Timing out on ARM linux bot: http://crbug.com/238490 |
#define MAYBE_CanSetupVideoCall DISABLED_CanSetupVideoCall |
@@ -57,7 +68,7 @@ class WebRtcBrowserTest : public WebRtcContentBrowserTest { |
// These tests will make a complete PeerConnection-based call and verify that |
// video is playing for the call. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupVideoCall) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupVideoCall) { |
MakeTypicalPeerConnectionCall("call({video: true});"); |
} |
@@ -68,18 +79,18 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupVideoCall) { |
#define MAYBE_CanSetupAudioAndVideoCall CanSetupAudioAndVideoCall |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupAudioAndVideoCall) { |
MakeTypicalPeerConnectionCall("call({video: true, audio: true});"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CanSetupCallAndSendDtmf) { |
MakeTypicalPeerConnectionCall("callAndSendDtmf(\'123,abc\');"); |
} |
// TODO(phoglund): this test fails because the peer connection state will be |
// stable in the second negotiation round rather than have-local-offer. |
// http://crbug.com/293125. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
DISABLED_CanMakeEmptyCallThenAddStreamsAndRenegotiate) { |
const char* kJavascript = |
"callEmptyThenAddOneStreamAndRenegotiate({video: true, audio: true});"; |
@@ -97,12 +108,12 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
#define MAYBE_CanForwardRemoteStream CanForwardRemoteStream |
#define MAYBE_CanForwardRemoteStream720p CanForwardRemoteStream720p |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream) { |
MakeTypicalPeerConnectionCall( |
"callAndForwardRemoteStream({video: true, audio: false});"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { |
const std::string javascript = GenerateGetUserMediaCall( |
"callAndForwardRemoteStream", 1280, 1280, 720, 720, 30, 30); |
MakeTypicalPeerConnectionCall(javascript); |
@@ -120,7 +131,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanForwardRemoteStream720p) { |
#define MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle\ |
CanSetupAudioAndVideoCallWithoutMsidAndBundle |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
MAYBE_CanSetupAudioAndVideoCallWithoutMsidAndBundle) { |
MakeTypicalPeerConnectionCall("callWithoutMsidAndBundle();"); |
} |
@@ -135,7 +146,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
#define MAYBE_NegotiateUnsupportedVideoCodec NegotiateUnsupportedVideoCodec |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
MAYBE_NegotiateUnsupportedVideoCodec) { |
MakeTypicalPeerConnectionCall("negotiateUnsupportedVideoCodec();"); |
} |
@@ -149,13 +160,13 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
#define MAYBE_NegotiateNonCryptoCall NegotiateNonCryptoCall |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_NegotiateNonCryptoCall) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_NegotiateNonCryptoCall) { |
MakeTypicalPeerConnectionCall("negotiateNonCryptoCall();"); |
} |
// This test can negotiate an SDP offer that includes a b=AS:xx to control |
// the bandwidth for audio and video |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, NegotiateOfferWithBLine) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, NegotiateOfferWithBLine) { |
MakeTypicalPeerConnectionCall("negotiateOfferWithBLine();"); |
} |
@@ -168,18 +179,18 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, NegotiateOfferWithBLine) { |
#define MAYBE_CanSetupLegacyCall CanSetupLegacyCall |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CanSetupLegacyCall) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CanSetupLegacyCall) { |
MakeTypicalPeerConnectionCall("callWithLegacySdp();"); |
} |
// This test will make a PeerConnection-based call and test an unreliable text |
// dataChannel. |
// TODO(mallinath) - Remove this test after rtp based data channel is disabled. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallWithDataOnly) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallWithDataOnly) { |
MakeTypicalPeerConnectionCall("callWithDataOnly();"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallWithSctpDataOnly) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallWithSctpDataOnly) { |
MakeTypicalPeerConnectionCall("callWithSctpDataOnly();"); |
} |
@@ -193,7 +204,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallWithSctpDataOnly) { |
// This test will make a PeerConnection-based call and test an unreliable text |
// dataChannel and audio and video tracks. |
// TODO(mallinath) - Remove this test after rtp based data channel is disabled. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithDataAndMedia) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithDataAndMedia) { |
MakeTypicalPeerConnectionCall("callWithDataAndMedia();"); |
} |
@@ -205,7 +216,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithDataAndMedia) { |
#define MAYBE_CallWithSctpDataAndMedia CallWithSctpDataAndMedia |
#endif |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
MAYBE_CallWithSctpDataAndMedia) { |
MakeTypicalPeerConnectionCall("callWithSctpDataAndMedia();"); |
} |
@@ -220,7 +231,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
// This test will make a PeerConnection-based call and test an unreliable text |
// dataChannel and later add an audio and video track. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { |
MakeTypicalPeerConnectionCall("callWithDataAndLaterAddMedia();"); |
} |
@@ -234,7 +245,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithDataAndLaterAddMedia) { |
// This test will make a PeerConnection-based call and send a new Video |
// MediaStream that has been created based on a MediaStream created with |
// getUserMedia. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { |
MakeTypicalPeerConnectionCall("callWithNewVideoMediaStream();"); |
} |
@@ -244,16 +255,16 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithNewVideoMediaStream) { |
// AudioTrack is added instead. |
// TODO(phoglund): This test is manual since not all buildbots has an audio |
// input. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MANUAL_CallAndModifyStream) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MANUAL_CallAndModifyStream) { |
MakeTypicalPeerConnectionCall( |
"callWithNewVideoMediaStreamLaterSwitchToAudio();"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, AddTwoMediaStreamsToOnePC) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, AddTwoMediaStreamsToOnePC) { |
MakeTypicalPeerConnectionCall("addTwoMediaStreamsToOneConnection();"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
EstablishAudioVideoCallAndMeasureOutputLevel) { |
if (!media::AudioManager::Get()->HasAudioOutputDevices()) { |
// Bots with no output devices will force the audio code into a different |
@@ -272,7 +283,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
MakeTypicalPeerConnectionCall("callAndEnsureAudioIsPlaying();"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
EstablishAudioVideoCallAndVerifyMutingWorks) { |
if (!media::AudioManager::Get()->HasAudioOutputDevices()) { |
// Bots with no output devices will force the audio code into a different |
@@ -291,7 +302,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
MakeTypicalPeerConnectionCall("callAndEnsureAudioMutingWorks();"); |
} |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
MakeTypicalPeerConnectionCall("callAndEnsureVideoMutingWorks();"); |
} |
@@ -309,7 +320,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, CallAndVerifyVideoMutingWorks) { |
// and Javascript is bypassed since it would trigger a file picker dialog. |
// Instead, the dialog callback FileSelected() is invoked directly. In fact, |
// there's never a webrtc-internals page opened at all since that's not needed. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithAecDump) { |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, MAYBE_CallWithAecDump) { |
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |
// We must navigate somewhere first so that the render process is created. |
@@ -344,7 +355,7 @@ IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, MAYBE_CallWithAecDump) { |
// As above, but enable and disable dump before starting a call. The file should |
// be created, but should be empty. |
-IN_PROC_BROWSER_TEST_F(WebRtcBrowserTest, |
+IN_PROC_BROWSER_TEST_P(WebRtcBrowserTest, |
MAYBE_CallWithAecDumpEnabledThenDisabled) { |
ASSERT_TRUE(embedded_test_server()->InitializeAndWaitUntilReady()); |