Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(283)

Unified Diff: webrtc/api/webrtcsession_unittest.cc

Issue 1844803002: Modify PeerConnection for end-to-end QuicDataChannel usage (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/api/webrtcsession_unittest.cc
diff --git a/webrtc/api/webrtcsession_unittest.cc b/webrtc/api/webrtcsession_unittest.cc
index 18c1a95116e5e812c0f784137c5fb28a463e895c..ef3da37d05114ac12a301a29bfb58d94be247d7b 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -4275,6 +4275,32 @@ TEST_P(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesSeparated) {
SetLocalDescriptionWithoutError(answer);
}
+#ifdef USE_QUIC
+// Test that when the local session description specifies QUIC and is an offer,
+// then QUIC is used.
+TEST_P(WebRtcSessionTest, TestUseQuicTransportWithLocalQuicOffer) {
+ InitWithDtls(GetParam());
+ SessionDescriptionInterface* offer = CreateOffer();
+ offer->description()->set_quic(true);
+ EXPECT_EQ(nullptr, session_->quic_transport_channel());
+ SetLocalDescriptionWithoutError(offer);
+ EXPECT_NE(nullptr, session_->quic_transport_channel());
+ EXPECT_EQ(cricket::DCT_QUIC, session_->data_channel_type());
+}
+
+// Test that when the remote session description specifies QUIC and is an offer,
+// then QUIC is used.
+TEST_P(WebRtcSessionTest, TestUseQuicTransportWithRemoteQuicOffer) {
+ InitWithDtls(GetParam());
+ SessionDescriptionInterface* offer = CreateOffer();
+ offer->description()->set_quic(true);
+ EXPECT_EQ(nullptr, session_->quic_transport_channel());
+ SetRemoteDescriptionWithoutError(offer);
+ EXPECT_NE(nullptr, session_->quic_transport_channel());
+ EXPECT_EQ(cricket::DCT_QUIC, session_->data_channel_type());
+}
+#endif // USE_QUIC
+
// Flaky on Win and Mac only. See webrtc:4943
#if defined(WEBRTC_WIN) || defined(WEBRTC_MAC)
#define MAYBE_TestRtxRemovedByCreateAnswer DISABLED_TestRtxRemovedByCreateAnswer

Powered by Google App Engine
This is Rietveld 408576698