From 7a12b5ad8eafec0b85e7e474e094d34141d14a56 Mon Sep 17 00:00:00 2001 From: kwiberg Date: Thu, 27 Apr 2017 03:55:57 -0700 Subject: [PATCH] Run some peer connection end-to-end tests with an empty audio decoder factory Specifically, the tests that only use data channels shouldn't need any audio codec support; by using an audio decoder factory that supports no codecs, we ensure that this is the case. For completeness, I tried doing the same to the two tests that actually use audio and video; as expected, they fail, with messages like this: [000:032] (webrtcsession.cc:334): Failed to set remote sdp: Session error code: ERROR_CONTENT. Session error description: Failed to set local audio description recv parameters.. BUG=webrtc:5805 Review-Url: https://codereview.webrtc.org/2848563002 Cr-Commit-Position: refs/heads/master@{#17907} --- webrtc/pc/peerconnectionendtoend_unittest.cc | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/webrtc/pc/peerconnectionendtoend_unittest.cc b/webrtc/pc/peerconnectionendtoend_unittest.cc index f2a9641c11..ca9c3a3ea6 100644 --- a/webrtc/pc/peerconnectionendtoend_unittest.cc +++ b/webrtc/pc/peerconnectionendtoend_unittest.cc @@ -290,7 +290,7 @@ TEST_F(PeerConnectionEndToEndTest, CallWithLegacySdp) { // "OPEN" and transfer data. TEST_F(PeerConnectionEndToEndTest, CreateDataChannelBeforeNegotiate) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; rtc::scoped_refptr caller_dc( @@ -315,7 +315,7 @@ TEST_F(PeerConnectionEndToEndTest, CreateDataChannelBeforeNegotiate) { // "OPEN" and transfer data. TEST_F(PeerConnectionEndToEndTest, CreateDataChannelAfterNegotiate) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; @@ -347,7 +347,7 @@ TEST_F(PeerConnectionEndToEndTest, CreateDataChannelAfterNegotiate) { // Verifies that DataChannel IDs are even/odd based on the DTLS roles. TEST_F(PeerConnectionEndToEndTest, DataChannelIdAssignment) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; rtc::scoped_refptr caller_dc_1( @@ -375,7 +375,7 @@ TEST_F(PeerConnectionEndToEndTest, DataChannelIdAssignment) { TEST_F(PeerConnectionEndToEndTest, MessageTransferBetweenTwoPairsOfDataChannels) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; @@ -497,7 +497,7 @@ TEST_F(PeerConnectionEndToEndTest, MessageTransferBetweenQuicDataChannels) { TEST_F(PeerConnectionEndToEndTest, DISABLED_DataChannelFromOpenWorksAfterClose) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; rtc::scoped_refptr caller_dc( @@ -524,7 +524,7 @@ TEST_F(PeerConnectionEndToEndTest, // See: https://code.google.com/p/chromium/issues/detail?id=565048 TEST_F(PeerConnectionEndToEndTest, CloseDataChannelRemotelyWhileNotReferenced) { CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(), - webrtc::CreateBuiltinAudioDecoderFactory()); + webrtc::MockAudioDecoderFactory::CreateEmptyFactory()); webrtc::DataChannelInit init; rtc::scoped_refptr caller_dc(