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

Unified Diff: webrtc/pc/peerconnectioninterface_unittest.cc

Issue 2808913003: Add "ice-option:trickle" to generated offers/answers. (Closed)
Patch Set: Merge with master Created 3 years, 8 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
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/peerconnectioninterface_unittest.cc
diff --git a/webrtc/pc/peerconnectioninterface_unittest.cc b/webrtc/pc/peerconnectioninterface_unittest.cc
index e7636e024fe624eb7838e42c8664b9c653b2f2a4..91c79ebb76eaeec7ddde66ee0cbd19b1b7732b59 100644
--- a/webrtc/pc/peerconnectioninterface_unittest.cc
+++ b/webrtc/pc/peerconnectioninterface_unittest.cc
@@ -3165,6 +3165,31 @@ TEST_F(PeerConnectionInterfaceTest,
pc_->StopRtcEventLog();
}
+// Test that generated offers/answers include "ice-option:trickle".
+TEST_F(PeerConnectionInterfaceTest, OffersAndAnswersHaveTrickleIceOption) {
+ CreatePeerConnection();
+
+ // First, create an offer with audio/video.
+ FakeConstraints constraints;
+ constraints.SetMandatoryReceiveAudio(true);
+ constraints.SetMandatoryReceiveVideo(true);
+ std::unique_ptr<SessionDescriptionInterface> offer;
+ ASSERT_TRUE(DoCreateOffer(&offer, &constraints));
+ cricket::SessionDescription* desc = offer->description();
+ ASSERT_EQ(2u, desc->transport_infos().size());
+ EXPECT_TRUE(desc->transport_infos()[0].description.HasOption("trickle"));
+ EXPECT_TRUE(desc->transport_infos()[1].description.HasOption("trickle"));
+
+ // Apply the offer as a remote description, then create an answer.
+ EXPECT_TRUE(DoSetRemoteDescription(offer.release()));
+ std::unique_ptr<SessionDescriptionInterface> answer;
+ ASSERT_TRUE(DoCreateAnswer(&answer, &constraints));
+ desc = answer->description();
+ ASSERT_EQ(2u, desc->transport_infos().size());
+ EXPECT_TRUE(desc->transport_infos()[0].description.HasOption("trickle"));
+ EXPECT_TRUE(desc->transport_infos()[1].description.HasOption("trickle"));
+}
+
// Test that ICE renomination isn't offered if it's not enabled in the PC's
// RTCConfiguration.
TEST_F(PeerConnectionInterfaceTest, IceRenominationNotOffered) {
« no previous file with comments | « webrtc/pc/peerconnection_integrationtest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698