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

Unified Diff: webrtc/p2p/base/transportdescriptionfactory_unittest.cc

Issue 2808913003: Add "ice-option:trickle" to generated offers/answers. (Closed)
Patch Set: 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
Index: webrtc/p2p/base/transportdescriptionfactory_unittest.cc
diff --git a/webrtc/p2p/base/transportdescriptionfactory_unittest.cc b/webrtc/p2p/base/transportdescriptionfactory_unittest.cc
index 195ccd239bdfc24bed670e36db310edc6e545b40..83bc072ae4b0c25defae18fdfc2ad80303d0d596 100644
--- a/webrtc/p2p/base/transportdescriptionfactory_unittest.cc
+++ b/webrtc/p2p/base/transportdescriptionfactory_unittest.cc
@@ -127,8 +127,7 @@ class TransportDescriptionFactoryTest : public testing::Test {
bool renomination_expected) {
ASSERT_TRUE(desc != nullptr);
std::vector<std::string>& options = desc->transport_options;
- auto iter = std::find(options.begin(), options.end(),
- cricket::ICE_RENOMINATION_STR);
+ auto iter = std::find(options.begin(), options.end(), "renomination");
EXPECT_EQ(renomination_expected, iter != options.end());
}
@@ -300,3 +299,14 @@ TEST_F(TransportDescriptionFactoryTest, TestIceRenomination) {
TEST_F(TransportDescriptionFactoryTest, TestIceRenominationWithDtls) {
TestIceRenomination(true);
}
+
+// Test that offers and answers have ice-option:trickle.
+TEST_F(TransportDescriptionFactoryTest, AddsTrickleIceOption) {
+ cricket::TransportOptions options;
+ std::unique_ptr<TransportDescription> offer(
+ f1_.CreateOffer(options, nullptr));
+ EXPECT_TRUE(offer->HasOption("trickle"));
+ std::unique_ptr<TransportDescription> answer(
+ f2_.CreateAnswer(offer.get(), options, true, nullptr));
+ EXPECT_TRUE(answer->HasOption("trickle"));
+}

Powered by Google App Engine
This is Rietveld 408576698