Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc |
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc |
index 4286d76be33bc37a9b7f694f31b93f79b348e64b..a8ac98775cc4a92c96bb08f961f6f77ab350257c 100644 |
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc |
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc |
@@ -670,6 +670,22 @@ TEST_F(DtlsTransportChannelTest, TestTransferDtlsTwoChannels) { |
TestTransfer(1, 1000, 100, false); |
} |
+// Connect with DTLS, combine multiple DTLS records into one packet. |
+// Our DTLS implementation doesn't do this, but other implementations may; |
+// see https://tools.ietf.org/html/rfc6347#section-4.1.1. |
+// This has caused interoperability problems with ORTCLib in the past. |
+TEST_F(DtlsTransportChannelTest, TestTransferDtlsCombineRecords) { |
+ PrepareDtls(true, true, rtc::KT_DEFAULT); |
+ ASSERT_TRUE(Connect()); |
+ // Our DTLS implementation always sends one record per packet, so to simulate |
+ // an endpoint that sends multiple records per packet, we configure the fake |
+ // ICE transport to combine every two consecutive packets into a single |
+ // packet. |
+ cricket::FakeIceTransport* transport = client1_.GetFakeIceTransort(0); |
+ transport->combine_outgoing_packets(true); |
+ TestTransfer(0, 500, 100, false); |
+} |
+ |
// Connect with A doing DTLS and B not, and transfer some data. |
TEST_F(DtlsTransportChannelTest, TestTransferDtlsRejected) { |
PrepareDtls(true, false, rtc::KT_DEFAULT); |