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}
diff --git a/pc/data_channel_integrationtest.cc b/pc/data_channel_integrationtest.cc
index 37fc19f..043a7c3 100644
--- a/pc/data_channel_integrationtest.cc
+++ b/pc/data_channel_integrationtest.cc
@@ -1474,7 +1474,24 @@
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 @@
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;