Bug 1240897 - Part 0: Test that we do not gratuitously switch DTLS roles on renegotiation. r=mjf

Differential Revision: https://phabricator.services.mozilla.com/D24735

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Byron Campen [:bwc] 2019-03-26 04:22:33 +00:00
Родитель 25d855c4ff
Коммит 289356a9b8
1 изменённых файлов: 20 добавлений и 0 удалений

Просмотреть файл

@ -5528,6 +5528,26 @@ TEST_F(JsepSessionTest, AudioCallAnswererUsesActpass) {
ASSERT_EQ(kJsepStateHaveLocalOffer, mSessionOff->GetState());
}
// Verify that 'actpass' in reoffer from previous answerer doesn't result
// in a role switch.
TEST_F(JsepSessionTest, AudioCallPreviousAnswererUsesActpassInReoffer) {
types.push_back(SdpMediaSection::kAudio);
AddTracks(*mSessionOff, "audio");
AddTracks(*mSessionAns, "audio");
OfferAnswer();
ValidateSetupAttribute(*mSessionOff, SdpSetupAttribute::kActpass);
ValidateSetupAttribute(*mSessionAns, SdpSetupAttribute::kActive);
SwapOfferAnswerRoles();
OfferAnswer();
ValidateSetupAttribute(*mSessionOff, SdpSetupAttribute::kActpass);
ValidateSetupAttribute(*mSessionAns, SdpSetupAttribute::kPassive);
}
// Disabled: See Bug 1329028
TEST_F(JsepSessionTest, DISABLED_AudioCallOffererAttemptsSetupRoleSwitch) {
types.push_back(SdpMediaSection::kAudio);