DTLS 1.3 - patch 5

Extend DtlsRestart test to also
test with Dtls13 (and add variants
that tests caller/callee active).

BUG=webrtc:383141571

Change-Id: Ib8b48653d4ad3cb2f5d66d6e28fc9ab54064d804
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/375620
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Commit-Queue: Jonas Oreland <jonaso@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#43813}
This commit is contained in:
Jonas Oreland 2025-01-28 11:00:15 +01:00 committed by WebRTC LUCI CQ
parent d8fea51d65
commit 4a210486d3

View File

@ -1474,7 +1474,24 @@ TEST_F(DataChannelIntegrationTestUnifiedPlan,
IsRtcOk());
}
TEST_F(DataChannelIntegrationTestUnifiedPlan, DtlsRestart) {
class DataChannelIntegrationTestUnifiedPlanFieldTrials
: public DataChannelIntegrationTestUnifiedPlan,
public ::testing::WithParamInterface<
std::tuple</* callee-DTLS-active=*/bool, std::string>> {
protected:
DataChannelIntegrationTestUnifiedPlanFieldTrials() {
SetFieldTrials(std::get<1>(GetParam()));
}
private:
};
INSTANTIATE_TEST_SUITE_P(DataChannelIntegrationTestUnifiedPlanFieldTrials,
DataChannelIntegrationTestUnifiedPlanFieldTrials,
Combine(testing::Bool(),
Values("", "WebRTC-ForceDtls13/Enabled/")));
TEST_P(DataChannelIntegrationTestUnifiedPlanFieldTrials, DtlsRestart) {
RTCConfiguration config;
ASSERT_TRUE(CreatePeerConnectionWrappersWithConfig(config, config));
PeerConnectionDependencies dependencies(nullptr);
@ -1486,6 +1503,12 @@ TEST_F(DataChannelIntegrationTestUnifiedPlan, DtlsRestart) {
std::move(dependencies), nullptr,
/*reset_encoder_factory=*/false,
/*reset_decoder_factory=*/false);
if (std::get<0>(GetParam())) {
callee()->SetReceivedSdpMunger(MakeActiveSctpOffer);
callee2->SetReceivedSdpMunger(MakeActiveSctpOffer);
}
ConnectFakeSignaling();
DataChannelInit dc_init;