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}
This commit is contained in:
kwiberg 2017-04-27 03:55:57 -07:00 committed by Commit bot
parent 0f80a7a5a6
commit 7a12b5ad8e

View File

@ -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<DataChannelInterface> 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<DataChannelInterface> 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<DataChannelInterface> 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<DataChannelInterface> caller_dc(