Parameterize PeerConnection interface tests for Unified Plan
Bug: webrtc:8765 Change-Id: I550164bc8c6cf133f7b72a22d86bd4a704a8c1d3 Reviewed-on: https://webrtc-review.googlesource.com/47242 Commit-Queue: Steve Anton <steveanton@webrtc.org> Reviewed-by: Taylor Brandstetter <deadbeef@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22065}
This commit is contained in:
@ -348,11 +348,10 @@ struct AudioDecoderUnicornSparklesRainbow {
|
|||||||
// Disabled for Mac, see
|
// Disabled for Mac, see
|
||||||
// https://bugs.chromium.org/p/webrtc/issues/detail?id=5231 for details.
|
// https://bugs.chromium.org/p/webrtc/issues/detail?id=5231 for details.
|
||||||
#if defined(THREAD_SANITIZER) || defined(WEBRTC_MAC)
|
#if defined(THREAD_SANITIZER) || defined(WEBRTC_MAC)
|
||||||
#define MAYBE_Call DISABLED_Call
|
TEST_P(PeerConnectionEndToEndTest, DISABLED_Call) {
|
||||||
#else
|
#else
|
||||||
#define MAYBE_Call Call
|
TEST_P(PeerConnectionEndToEndTest, Call) {
|
||||||
#endif
|
#endif // defined(THREAD_SANITIZER) || defined(WEBRTC_MAC)
|
||||||
TEST_P(PeerConnectionEndToEndTest, MAYBE_Call) {
|
|
||||||
rtc::scoped_refptr<webrtc::AudioDecoderFactory> real_decoder_factory =
|
rtc::scoped_refptr<webrtc::AudioDecoderFactory> real_decoder_factory =
|
||||||
webrtc::CreateBuiltinAudioDecoderFactory();
|
webrtc::CreateBuiltinAudioDecoderFactory();
|
||||||
CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(),
|
CreatePcs(nullptr, webrtc::CreateBuiltinAudioEncoderFactory(),
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -145,6 +145,23 @@ class MockPeerConnectionObserver : public PeerConnectionObserver {
|
|||||||
return receivers;
|
return receivers;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int CountAddTrackEventsForStream(const std::string& stream_label) {
|
||||||
|
int found_tracks = 0;
|
||||||
|
for (const AddTrackEvent& event : add_track_events_) {
|
||||||
|
bool has_stream_label = false;
|
||||||
|
for (auto stream : event.streams) {
|
||||||
|
if (stream->label() == stream_label) {
|
||||||
|
has_stream_label = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (has_stream_label) {
|
||||||
|
++found_tracks;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return found_tracks;
|
||||||
|
}
|
||||||
|
|
||||||
// Returns the label of the last added stream.
|
// Returns the label of the last added stream.
|
||||||
// Empty string if no stream have been added.
|
// Empty string if no stream have been added.
|
||||||
std::string GetLastAddedStreamLabel() {
|
std::string GetLastAddedStreamLabel() {
|
||||||
|
@ -79,7 +79,7 @@ static const char kFireFoxSdpOffer[] =
|
|||||||
; // NOLINT(whitespace/semicolon)
|
; // NOLINT(whitespace/semicolon)
|
||||||
|
|
||||||
// Audio SDP with a limited set of audio codecs.
|
// Audio SDP with a limited set of audio codecs.
|
||||||
static const char kAudioSdp[] =
|
static const char kAudioSdpPlanB[] =
|
||||||
"v=0\r\n"
|
"v=0\r\n"
|
||||||
"o=- 7859371131 2 IN IP4 192.168.30.208\r\n"
|
"o=- 7859371131 2 IN IP4 192.168.30.208\r\n"
|
||||||
"s=-\r\n"
|
"s=-\r\n"
|
||||||
@ -101,8 +101,33 @@ static const char kAudioSdp[] =
|
|||||||
"a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n"
|
"a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n"
|
||||||
"a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n"
|
"a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n"
|
||||||
"a=mid:audio\r\n";
|
"a=mid:audio\r\n";
|
||||||
|
// Same string as above but with the MID changed to the Unified Plan default.
|
||||||
|
// This is needed so that this SDP can be used as an answer for a Unified Plan
|
||||||
|
// offer.
|
||||||
|
static const char kAudioSdpUnifiedPlan[] =
|
||||||
|
"v=0\r\n"
|
||||||
|
"o=- 7859371131 2 IN IP4 192.168.30.208\r\n"
|
||||||
|
"s=-\r\n"
|
||||||
|
"c=IN IP4 192.168.30.208\r\n"
|
||||||
|
"t=0 0\r\n"
|
||||||
|
"m=audio 16000 RTP/SAVPF 0 8 126\r\n"
|
||||||
|
"a=rtpmap:0 PCMU/8000\r\n"
|
||||||
|
"a=rtpmap:8 PCMA/8000\r\n"
|
||||||
|
"a=rtpmap:126 telephone-event/8000\r\n"
|
||||||
|
"a=sendrecv\r\n"
|
||||||
|
"a=rtcp:16000 IN IP4 192.168.30.208\r\n"
|
||||||
|
"a=rtcp-mux\r\n"
|
||||||
|
"a=crypto:1 AES_CM_128_HMAC_SHA1_80 "
|
||||||
|
"inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
|
||||||
|
"a=ice-ufrag:AI2sRT3r\r\n"
|
||||||
|
"a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
|
||||||
|
"a=ssrc:4227871655 cname:GeAAgb6XCPNLVMX5\r\n"
|
||||||
|
"a=ssrc:4227871655 msid:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4 a0\r\n"
|
||||||
|
"a=ssrc:4227871655 mslabel:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4\r\n"
|
||||||
|
"a=ssrc:4227871655 label:1NFAV3iD08ioO2339rQS9pfOI9mDf6GeG9F4a0\r\n"
|
||||||
|
"a=mid:0\r\n";
|
||||||
|
|
||||||
static const char kAudioSdpWithUnsupportedCodecs[] =
|
static const char kAudioSdpWithUnsupportedCodecsPlanB[] =
|
||||||
"v=0\r\n"
|
"v=0\r\n"
|
||||||
"o=- 6858750541 2 IN IP4 192.168.30.208\r\n"
|
"o=- 6858750541 2 IN IP4 192.168.30.208\r\n"
|
||||||
"s=-\r\n"
|
"s=-\r\n"
|
||||||
@ -126,6 +151,33 @@ static const char kAudioSdpWithUnsupportedCodecs[] =
|
|||||||
"a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n"
|
"a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n"
|
||||||
"a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n"
|
"a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n"
|
||||||
"a=mid:audio\r\n";
|
"a=mid:audio\r\n";
|
||||||
|
// Same string as above but with the MID changed to the Unified Plan default.
|
||||||
|
// This is needed so that this SDP can be used as an answer for a Unified Plan
|
||||||
|
// offer.
|
||||||
|
static const char kAudioSdpWithUnsupportedCodecsUnifiedPlan[] =
|
||||||
|
"v=0\r\n"
|
||||||
|
"o=- 6858750541 2 IN IP4 192.168.30.208\r\n"
|
||||||
|
"s=-\r\n"
|
||||||
|
"c=IN IP4 192.168.30.208\r\n"
|
||||||
|
"t=0 0\r\n"
|
||||||
|
"m=audio 16000 RTP/SAVPF 0 8 18 110 126\r\n"
|
||||||
|
"a=rtpmap:0 PCMU/8000\r\n"
|
||||||
|
"a=rtpmap:8 PCMA/8000\r\n"
|
||||||
|
"a=rtpmap:18 WeirdCodec1/8000\r\n"
|
||||||
|
"a=rtpmap:110 WeirdCodec2/8000\r\n"
|
||||||
|
"a=rtpmap:126 telephone-event/8000\r\n"
|
||||||
|
"a=sendonly\r\n"
|
||||||
|
"a=rtcp:16000 IN IP4 192.168.30.208\r\n"
|
||||||
|
"a=rtcp-mux\r\n"
|
||||||
|
"a=crypto:1 AES_CM_128_HMAC_SHA1_80 "
|
||||||
|
"inline:tvKIFjbMQ7W0/C2RzhwN0oQglj/7GJg+frdsNRxt\r\n"
|
||||||
|
"a=ice-ufrag:AI2sRT3r\r\n"
|
||||||
|
"a=ice-pwd:lByS9z2RSQlSE9XurlvjYmEm\r\n"
|
||||||
|
"a=ssrc:4227871655 cname:TsmD02HRfhkJBm4m\r\n"
|
||||||
|
"a=ssrc:4227871655 msid:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3 a0\r\n"
|
||||||
|
"a=ssrc:4227871655 mslabel:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3\r\n"
|
||||||
|
"a=ssrc:4227871655 label:7nU0TApbB-n4dfPlCplWT9QTEsbBDS1IlpW3a0\r\n"
|
||||||
|
"a=mid:0\r\n";
|
||||||
|
|
||||||
} // namespace webrtc
|
} // namespace webrtc
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user