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

Unified Diff: webrtc/api/webrtcsession_unittest.cc

Issue 2089553002: Refactoring on QUIC (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Disable quic for review. Created 4 years, 6 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 e8234d7c1b9295ad8428b6d17fd4203e865c6c50..33dce21443b5aede0be25b68e1d88472268aeb26 100644
--- a/webrtc/api/webrtcsession_unittest.cc
+++ b/webrtc/api/webrtcsession_unittest.cc
@@ -549,6 +549,8 @@ class WebRtcSessionTest
if (session_->data_channel_type() == cricket::DCT_SCTP && data_channel_) {
session_options->data_channel_type = cricket::DCT_SCTP;
+ } else if (session_->data_channel_type() == cricket::DCT_QUIC) {
+ session_options->data_channel_type = cricket::DCT_QUIC;
}
}
@@ -564,6 +566,8 @@ class WebRtcSessionTest
if (session_->data_channel_type() == cricket::DCT_SCTP) {
session_options->data_channel_type = cricket::DCT_SCTP;
+ } else if (session_->data_channel_type() == cricket::DCT_QUIC) {
+ session_options->data_channel_type = cricket::DCT_QUIC;
}
}
@@ -4308,6 +4312,26 @@ TEST_P(WebRtcSessionTest, TestRenegotiateNewMediaWithCandidatesSeparated) {
SetLocalDescriptionWithoutError(answer);
}
+#ifdef HAVE_QUIC
+TEST_P(WebRtcSessionTest, TestUseQuic) {
Taylor Brandstetter 2016/06/29 17:50:04 Maybe "TestNegotiateQuic" would be a better name,
+ configuration_.enable_quic = true;
+ InitWithDtls(GetParam());
+ EXPECT_TRUE(session_->data_channel_type() == cricket::DCT_QUIC);
+ SessionDescriptionInterface* offer = CreateOffer();
+ ASSERT_TRUE(offer);
+ ASSERT_TRUE(offer->description());
+ SetLocalDescriptionWithoutError(offer);
+ cricket::MediaSessionOptions options;
+ options.recv_audio = true;
+ options.recv_video = true;
+ SessionDescriptionInterface* answer =
+ CreateRemoteAnswer(offer, options, cricket::SEC_DISABLED);
+ ASSERT_TRUE(answer);
+ ASSERT_TRUE(answer->description());
+ SetRemoteDescriptionWithoutError(answer);
+}
+#endif // HAVE_QUIC
+
// Tests that RTX codec is removed from the answer when it isn't supported
// by local side.
TEST_F(WebRtcSessionTest, TestRtxRemovedByCreateAnswer) {

Powered by Google App Engine
This is Rietveld 408576698