| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. | 2 * Copyright 2012 The WebRTC Project Authors. All rights reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 16 matching lines...) Expand all Loading... |
| 27 public: | 27 public: |
| 28 TransportDescriptionFactoryTest() | 28 TransportDescriptionFactoryTest() |
| 29 : cert1_(rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( | 29 : cert1_(rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( |
| 30 new rtc::FakeSSLIdentity("User1")))), | 30 new rtc::FakeSSLIdentity("User1")))), |
| 31 cert2_(rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( | 31 cert2_(rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( |
| 32 new rtc::FakeSSLIdentity("User2")))) {} | 32 new rtc::FakeSSLIdentity("User2")))) {} |
| 33 | 33 |
| 34 void CheckDesc(const TransportDescription* desc, | 34 void CheckDesc(const TransportDescription* desc, |
| 35 const std::string& opt, const std::string& ice_ufrag, | 35 const std::string& opt, const std::string& ice_ufrag, |
| 36 const std::string& ice_pwd, const std::string& dtls_alg) { | 36 const std::string& ice_pwd, const std::string& dtls_alg) { |
| 37 ASSERT_TRUE(desc != NULL); | 37 ASSERT_TRUE(desc != nullptr); |
| 38 EXPECT_EQ(!opt.empty(), desc->HasOption(opt)); | 38 EXPECT_EQ(!opt.empty(), desc->HasOption(opt)); |
| 39 if (ice_ufrag.empty() && ice_pwd.empty()) { | 39 if (ice_ufrag.empty() && ice_pwd.empty()) { |
| 40 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH), | 40 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH), |
| 41 desc->ice_ufrag.size()); | 41 desc->ice_ufrag.size()); |
| 42 EXPECT_EQ(static_cast<size_t>(cricket::ICE_PWD_LENGTH), | 42 EXPECT_EQ(static_cast<size_t>(cricket::ICE_PWD_LENGTH), |
| 43 desc->ice_pwd.size()); | 43 desc->ice_pwd.size()); |
| 44 } else { | 44 } else { |
| 45 EXPECT_EQ(ice_ufrag, desc->ice_ufrag); | 45 EXPECT_EQ(ice_ufrag, desc->ice_ufrag); |
| 46 EXPECT_EQ(ice_pwd, desc->ice_pwd); | 46 EXPECT_EQ(ice_pwd, desc->ice_pwd); |
| 47 } | 47 } |
| 48 if (dtls_alg.empty()) { | 48 if (dtls_alg.empty()) { |
| 49 EXPECT_TRUE(desc->identity_fingerprint.get() == NULL); | 49 EXPECT_TRUE(desc->identity_fingerprint.get() == nullptr); |
| 50 } else { | 50 } else { |
| 51 ASSERT_TRUE(desc->identity_fingerprint.get() != NULL); | 51 ASSERT_TRUE(desc->identity_fingerprint.get() != nullptr); |
| 52 EXPECT_EQ(desc->identity_fingerprint->algorithm, dtls_alg); | 52 EXPECT_EQ(desc->identity_fingerprint->algorithm, dtls_alg); |
| 53 EXPECT_GT(desc->identity_fingerprint->digest.size(), 0U); | 53 EXPECT_GT(desc->identity_fingerprint->digest.size(), 0U); |
| 54 } | 54 } |
| 55 } | 55 } |
| 56 | 56 |
| 57 // This test ice restart by doing two offer answer exchanges. On the second | 57 // This test ice restart by doing two offer answer exchanges. On the second |
| 58 // exchange ice is restarted. The test verifies that the ufrag and password | 58 // exchange ice is restarted. The test verifies that the ufrag and password |
| 59 // in the offer and answer is changed. | 59 // in the offer and answer is changed. |
| 60 // If |dtls| is true, the test verifies that the finger print is not changed. | 60 // If |dtls| is true, the test verifies that the finger print is not changed. |
| 61 void TestIceRestart(bool dtls) { | 61 void TestIceRestart(bool dtls) { |
| 62 SetDtls(dtls); | 62 SetDtls(dtls); |
| 63 cricket::TransportOptions options; | 63 cricket::TransportOptions options; |
| 64 // The initial offer / answer exchange. | 64 // The initial offer / answer exchange. |
| 65 std::unique_ptr<TransportDescription> offer(f1_.CreateOffer(options, NULL)); | 65 std::unique_ptr<TransportDescription> offer( |
| 66 f1_.CreateOffer(options, nullptr)); |
| 66 std::unique_ptr<TransportDescription> answer( | 67 std::unique_ptr<TransportDescription> answer( |
| 67 f2_.CreateAnswer(offer.get(), options, NULL)); | 68 f2_.CreateAnswer(offer.get(), options, nullptr)); |
| 68 | 69 |
| 69 // Create an updated offer where we restart ice. | 70 // Create an updated offer where we restart ice. |
| 70 options.ice_restart = true; | 71 options.ice_restart = true; |
| 71 std::unique_ptr<TransportDescription> restart_offer( | 72 std::unique_ptr<TransportDescription> restart_offer( |
| 72 f1_.CreateOffer(options, offer.get())); | 73 f1_.CreateOffer(options, offer.get())); |
| 73 | 74 |
| 74 VerifyUfragAndPasswordChanged(dtls, offer.get(), restart_offer.get()); | 75 VerifyUfragAndPasswordChanged(dtls, offer.get(), restart_offer.get()); |
| 75 | 76 |
| 76 // Create a new answer. The transport ufrag and password is changed since | 77 // Create a new answer. The transport ufrag and password is changed since |
| 77 // |options.ice_restart == true| | 78 // |options.ice_restart == true| |
| 78 std::unique_ptr<TransportDescription> restart_answer( | 79 std::unique_ptr<TransportDescription> restart_answer( |
| 79 f2_.CreateAnswer(restart_offer.get(), options, answer.get())); | 80 f2_.CreateAnswer(restart_offer.get(), options, answer.get())); |
| 80 ASSERT_TRUE(restart_answer.get() != NULL); | 81 ASSERT_TRUE(restart_answer.get() != nullptr); |
| 81 | 82 |
| 82 VerifyUfragAndPasswordChanged(dtls, answer.get(), restart_answer.get()); | 83 VerifyUfragAndPasswordChanged(dtls, answer.get(), restart_answer.get()); |
| 83 } | 84 } |
| 84 | 85 |
| 85 void VerifyUfragAndPasswordChanged(bool dtls, | 86 void VerifyUfragAndPasswordChanged(bool dtls, |
| 86 const TransportDescription* org_desc, | 87 const TransportDescription* org_desc, |
| 87 const TransportDescription* restart_desc) { | 88 const TransportDescription* restart_desc) { |
| 88 EXPECT_NE(org_desc->ice_pwd, restart_desc->ice_pwd); | 89 EXPECT_NE(org_desc->ice_pwd, restart_desc->ice_pwd); |
| 89 EXPECT_NE(org_desc->ice_ufrag, restart_desc->ice_ufrag); | 90 EXPECT_NE(org_desc->ice_ufrag, restart_desc->ice_ufrag); |
| 90 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH), | 91 EXPECT_EQ(static_cast<size_t>(cricket::ICE_UFRAG_LENGTH), |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 146 | 147 |
| 147 TransportDescriptionFactory f1_; | 148 TransportDescriptionFactory f1_; |
| 148 TransportDescriptionFactory f2_; | 149 TransportDescriptionFactory f2_; |
| 149 | 150 |
| 150 rtc::scoped_refptr<rtc::RTCCertificate> cert1_; | 151 rtc::scoped_refptr<rtc::RTCCertificate> cert1_; |
| 151 rtc::scoped_refptr<rtc::RTCCertificate> cert2_; | 152 rtc::scoped_refptr<rtc::RTCCertificate> cert2_; |
| 152 }; | 153 }; |
| 153 | 154 |
| 154 TEST_F(TransportDescriptionFactoryTest, TestOfferDefault) { | 155 TEST_F(TransportDescriptionFactoryTest, TestOfferDefault) { |
| 155 std::unique_ptr<TransportDescription> desc( | 156 std::unique_ptr<TransportDescription> desc( |
| 156 f1_.CreateOffer(TransportOptions(), NULL)); | 157 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 157 CheckDesc(desc.get(), "", "", "", ""); | 158 CheckDesc(desc.get(), "", "", "", ""); |
| 158 } | 159 } |
| 159 | 160 |
| 160 TEST_F(TransportDescriptionFactoryTest, TestOfferDtls) { | 161 TEST_F(TransportDescriptionFactoryTest, TestOfferDtls) { |
| 161 f1_.set_secure(cricket::SEC_ENABLED); | 162 f1_.set_secure(cricket::SEC_ENABLED); |
| 162 f1_.set_certificate(cert1_); | 163 f1_.set_certificate(cert1_); |
| 163 std::string digest_alg; | 164 std::string digest_alg; |
| 164 ASSERT_TRUE(cert1_->ssl_certificate().GetSignatureDigestAlgorithm( | 165 ASSERT_TRUE(cert1_->ssl_certificate().GetSignatureDigestAlgorithm( |
| 165 &digest_alg)); | 166 &digest_alg)); |
| 166 std::unique_ptr<TransportDescription> desc( | 167 std::unique_ptr<TransportDescription> desc( |
| 167 f1_.CreateOffer(TransportOptions(), NULL)); | 168 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 168 CheckDesc(desc.get(), "", "", "", digest_alg); | 169 CheckDesc(desc.get(), "", "", "", digest_alg); |
| 169 // Ensure it also works with SEC_REQUIRED. | 170 // Ensure it also works with SEC_REQUIRED. |
| 170 f1_.set_secure(cricket::SEC_REQUIRED); | 171 f1_.set_secure(cricket::SEC_REQUIRED); |
| 171 desc.reset(f1_.CreateOffer(TransportOptions(), NULL)); | 172 desc.reset(f1_.CreateOffer(TransportOptions(), nullptr)); |
| 172 CheckDesc(desc.get(), "", "", "", digest_alg); | 173 CheckDesc(desc.get(), "", "", "", digest_alg); |
| 173 } | 174 } |
| 174 | 175 |
| 175 // Test generating an offer with DTLS fails with no identity. | 176 // Test generating an offer with DTLS fails with no identity. |
| 176 TEST_F(TransportDescriptionFactoryTest, TestOfferDtlsWithNoIdentity) { | 177 TEST_F(TransportDescriptionFactoryTest, TestOfferDtlsWithNoIdentity) { |
| 177 f1_.set_secure(cricket::SEC_ENABLED); | 178 f1_.set_secure(cricket::SEC_ENABLED); |
| 178 std::unique_ptr<TransportDescription> desc( | 179 std::unique_ptr<TransportDescription> desc( |
| 179 f1_.CreateOffer(TransportOptions(), NULL)); | 180 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 180 ASSERT_TRUE(desc.get() == NULL); | 181 ASSERT_TRUE(desc.get() == nullptr); |
| 181 } | 182 } |
| 182 | 183 |
| 183 // Test updating an offer with DTLS to pick ICE. | 184 // Test updating an offer with DTLS to pick ICE. |
| 184 // The ICE credentials should stay the same in the new offer. | 185 // The ICE credentials should stay the same in the new offer. |
| 185 TEST_F(TransportDescriptionFactoryTest, TestOfferDtlsReofferDtls) { | 186 TEST_F(TransportDescriptionFactoryTest, TestOfferDtlsReofferDtls) { |
| 186 f1_.set_secure(cricket::SEC_ENABLED); | 187 f1_.set_secure(cricket::SEC_ENABLED); |
| 187 f1_.set_certificate(cert1_); | 188 f1_.set_certificate(cert1_); |
| 188 std::string digest_alg; | 189 std::string digest_alg; |
| 189 ASSERT_TRUE(cert1_->ssl_certificate().GetSignatureDigestAlgorithm( | 190 ASSERT_TRUE(cert1_->ssl_certificate().GetSignatureDigestAlgorithm( |
| 190 &digest_alg)); | 191 &digest_alg)); |
| 191 std::unique_ptr<TransportDescription> old_desc( | 192 std::unique_ptr<TransportDescription> old_desc( |
| 192 f1_.CreateOffer(TransportOptions(), NULL)); | 193 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 193 ASSERT_TRUE(old_desc.get() != NULL); | 194 ASSERT_TRUE(old_desc.get() != nullptr); |
| 194 std::unique_ptr<TransportDescription> desc( | 195 std::unique_ptr<TransportDescription> desc( |
| 195 f1_.CreateOffer(TransportOptions(), old_desc.get())); | 196 f1_.CreateOffer(TransportOptions(), old_desc.get())); |
| 196 CheckDesc(desc.get(), "", | 197 CheckDesc(desc.get(), "", |
| 197 old_desc->ice_ufrag, old_desc->ice_pwd, digest_alg); | 198 old_desc->ice_ufrag, old_desc->ice_pwd, digest_alg); |
| 198 } | 199 } |
| 199 | 200 |
| 200 TEST_F(TransportDescriptionFactoryTest, TestAnswerDefault) { | 201 TEST_F(TransportDescriptionFactoryTest, TestAnswerDefault) { |
| 201 std::unique_ptr<TransportDescription> offer( | 202 std::unique_ptr<TransportDescription> offer( |
| 202 f1_.CreateOffer(TransportOptions(), NULL)); | 203 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 203 ASSERT_TRUE(offer.get() != NULL); | 204 ASSERT_TRUE(offer.get() != nullptr); |
| 204 std::unique_ptr<TransportDescription> desc( | 205 std::unique_ptr<TransportDescription> desc( |
| 205 f2_.CreateAnswer(offer.get(), TransportOptions(), NULL)); | 206 f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 206 CheckDesc(desc.get(), "", "", "", ""); | 207 CheckDesc(desc.get(), "", "", "", ""); |
| 207 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), | 208 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 208 NULL)); | |
| 209 CheckDesc(desc.get(), "", "", "", ""); | 209 CheckDesc(desc.get(), "", "", "", ""); |
| 210 } | 210 } |
| 211 | 211 |
| 212 // Test that we can update an answer properly; ICE credentials shouldn't change. | 212 // Test that we can update an answer properly; ICE credentials shouldn't change. |
| 213 TEST_F(TransportDescriptionFactoryTest, TestReanswer) { | 213 TEST_F(TransportDescriptionFactoryTest, TestReanswer) { |
| 214 std::unique_ptr<TransportDescription> offer( | 214 std::unique_ptr<TransportDescription> offer( |
| 215 f1_.CreateOffer(TransportOptions(), NULL)); | 215 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 216 ASSERT_TRUE(offer.get() != NULL); | 216 ASSERT_TRUE(offer.get() != nullptr); |
| 217 std::unique_ptr<TransportDescription> old_desc( | 217 std::unique_ptr<TransportDescription> old_desc( |
| 218 f2_.CreateAnswer(offer.get(), TransportOptions(), NULL)); | 218 f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 219 ASSERT_TRUE(old_desc.get() != NULL); | 219 ASSERT_TRUE(old_desc.get() != nullptr); |
| 220 std::unique_ptr<TransportDescription> desc( | 220 std::unique_ptr<TransportDescription> desc( |
| 221 f2_.CreateAnswer(offer.get(), TransportOptions(), old_desc.get())); | 221 f2_.CreateAnswer(offer.get(), TransportOptions(), old_desc.get())); |
| 222 ASSERT_TRUE(desc.get() != NULL); | 222 ASSERT_TRUE(desc.get() != nullptr); |
| 223 CheckDesc(desc.get(), "", | 223 CheckDesc(desc.get(), "", |
| 224 old_desc->ice_ufrag, old_desc->ice_pwd, ""); | 224 old_desc->ice_ufrag, old_desc->ice_pwd, ""); |
| 225 } | 225 } |
| 226 | 226 |
| 227 // Test that we handle answering an offer with DTLS with no DTLS. | 227 // Test that we handle answering an offer with DTLS with no DTLS. |
| 228 TEST_F(TransportDescriptionFactoryTest, TestAnswerDtlsToNoDtls) { | 228 TEST_F(TransportDescriptionFactoryTest, TestAnswerDtlsToNoDtls) { |
| 229 f1_.set_secure(cricket::SEC_ENABLED); | 229 f1_.set_secure(cricket::SEC_ENABLED); |
| 230 f1_.set_certificate(cert1_); | 230 f1_.set_certificate(cert1_); |
| 231 std::unique_ptr<TransportDescription> offer( | 231 std::unique_ptr<TransportDescription> offer( |
| 232 f1_.CreateOffer(TransportOptions(), NULL)); | 232 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 233 ASSERT_TRUE(offer.get() != NULL); | 233 ASSERT_TRUE(offer.get() != nullptr); |
| 234 std::unique_ptr<TransportDescription> desc( | 234 std::unique_ptr<TransportDescription> desc( |
| 235 f2_.CreateAnswer(offer.get(), TransportOptions(), NULL)); | 235 f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 236 CheckDesc(desc.get(), "", "", "", ""); | 236 CheckDesc(desc.get(), "", "", "", ""); |
| 237 } | 237 } |
| 238 | 238 |
| 239 // Test that we handle answering an offer without DTLS if we have DTLS enabled, | 239 // Test that we handle answering an offer without DTLS if we have DTLS enabled, |
| 240 // but fail if we require DTLS. | 240 // but fail if we require DTLS. |
| 241 TEST_F(TransportDescriptionFactoryTest, TestAnswerNoDtlsToDtls) { | 241 TEST_F(TransportDescriptionFactoryTest, TestAnswerNoDtlsToDtls) { |
| 242 f2_.set_secure(cricket::SEC_ENABLED); | 242 f2_.set_secure(cricket::SEC_ENABLED); |
| 243 f2_.set_certificate(cert2_); | 243 f2_.set_certificate(cert2_); |
| 244 std::unique_ptr<TransportDescription> offer( | 244 std::unique_ptr<TransportDescription> offer( |
| 245 f1_.CreateOffer(TransportOptions(), NULL)); | 245 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 246 ASSERT_TRUE(offer.get() != NULL); | 246 ASSERT_TRUE(offer.get() != nullptr); |
| 247 std::unique_ptr<TransportDescription> desc( | 247 std::unique_ptr<TransportDescription> desc( |
| 248 f2_.CreateAnswer(offer.get(), TransportOptions(), NULL)); | 248 f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 249 CheckDesc(desc.get(), "", "", "", ""); | 249 CheckDesc(desc.get(), "", "", "", ""); |
| 250 f2_.set_secure(cricket::SEC_REQUIRED); | 250 f2_.set_secure(cricket::SEC_REQUIRED); |
| 251 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), | 251 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 252 NULL)); | 252 ASSERT_TRUE(desc.get() == nullptr); |
| 253 ASSERT_TRUE(desc.get() == NULL); | |
| 254 } | 253 } |
| 255 | 254 |
| 256 // Test that we handle answering an DTLS offer with DTLS, both if we have | 255 // Test that we handle answering an DTLS offer with DTLS, both if we have |
| 257 // DTLS enabled and required. | 256 // DTLS enabled and required. |
| 258 TEST_F(TransportDescriptionFactoryTest, TestAnswerDtlsToDtls) { | 257 TEST_F(TransportDescriptionFactoryTest, TestAnswerDtlsToDtls) { |
| 259 f1_.set_secure(cricket::SEC_ENABLED); | 258 f1_.set_secure(cricket::SEC_ENABLED); |
| 260 f1_.set_certificate(cert1_); | 259 f1_.set_certificate(cert1_); |
| 261 | 260 |
| 262 f2_.set_secure(cricket::SEC_ENABLED); | 261 f2_.set_secure(cricket::SEC_ENABLED); |
| 263 f2_.set_certificate(cert2_); | 262 f2_.set_certificate(cert2_); |
| 264 // f2_ produces the answer that is being checked in this test, so the | 263 // f2_ produces the answer that is being checked in this test, so the |
| 265 // answer must contain fingerprint lines with cert2_'s digest algorithm. | 264 // answer must contain fingerprint lines with cert2_'s digest algorithm. |
| 266 std::string digest_alg2; | 265 std::string digest_alg2; |
| 267 ASSERT_TRUE(cert2_->ssl_certificate().GetSignatureDigestAlgorithm( | 266 ASSERT_TRUE(cert2_->ssl_certificate().GetSignatureDigestAlgorithm( |
| 268 &digest_alg2)); | 267 &digest_alg2)); |
| 269 | 268 |
| 270 std::unique_ptr<TransportDescription> offer( | 269 std::unique_ptr<TransportDescription> offer( |
| 271 f1_.CreateOffer(TransportOptions(), NULL)); | 270 f1_.CreateOffer(TransportOptions(), nullptr)); |
| 272 ASSERT_TRUE(offer.get() != NULL); | 271 ASSERT_TRUE(offer.get() != nullptr); |
| 273 std::unique_ptr<TransportDescription> desc( | 272 std::unique_ptr<TransportDescription> desc( |
| 274 f2_.CreateAnswer(offer.get(), TransportOptions(), NULL)); | 273 f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 275 CheckDesc(desc.get(), "", "", "", digest_alg2); | 274 CheckDesc(desc.get(), "", "", "", digest_alg2); |
| 276 f2_.set_secure(cricket::SEC_REQUIRED); | 275 f2_.set_secure(cricket::SEC_REQUIRED); |
| 277 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), | 276 desc.reset(f2_.CreateAnswer(offer.get(), TransportOptions(), nullptr)); |
| 278 NULL)); | |
| 279 CheckDesc(desc.get(), "", "", "", digest_alg2); | 277 CheckDesc(desc.get(), "", "", "", digest_alg2); |
| 280 } | 278 } |
| 281 | 279 |
| 282 // Test that ice ufrag and password is changed in an updated offer and answer | 280 // Test that ice ufrag and password is changed in an updated offer and answer |
| 283 // if |TransportDescriptionOptions::ice_restart| is true. | 281 // if |TransportDescriptionOptions::ice_restart| is true. |
| 284 TEST_F(TransportDescriptionFactoryTest, TestIceRestart) { | 282 TEST_F(TransportDescriptionFactoryTest, TestIceRestart) { |
| 285 TestIceRestart(false); | 283 TestIceRestart(false); |
| 286 } | 284 } |
| 287 | 285 |
| 288 // Test that ice ufrag and password is changed in an updated offer and answer | 286 // Test that ice ufrag and password is changed in an updated offer and answer |
| 289 // if |TransportDescriptionOptions::ice_restart| is true and DTLS is enabled. | 287 // if |TransportDescriptionOptions::ice_restart| is true and DTLS is enabled. |
| 290 TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) { | 288 TEST_F(TransportDescriptionFactoryTest, TestIceRestartWithDtls) { |
| 291 TestIceRestart(true); | 289 TestIceRestart(true); |
| 292 } | 290 } |
| 293 | 291 |
| 294 // Test that ice renomination is set in an updated offer and answer | 292 // Test that ice renomination is set in an updated offer and answer |
| 295 // if |TransportDescriptionOptions::enable_ice_renomination| is true. | 293 // if |TransportDescriptionOptions::enable_ice_renomination| is true. |
| 296 TEST_F(TransportDescriptionFactoryTest, TestIceRenomination) { | 294 TEST_F(TransportDescriptionFactoryTest, TestIceRenomination) { |
| 297 TestIceRenomination(false); | 295 TestIceRenomination(false); |
| 298 } | 296 } |
| 299 | 297 |
| 300 // Test that ice renomination is set in an updated offer and answer | 298 // Test that ice renomination is set in an updated offer and answer |
| 301 // if |TransportDescriptionOptions::enable_ice_renomination| is true and DTLS | 299 // if |TransportDescriptionOptions::enable_ice_renomination| is true and DTLS |
| 302 // is enabled. | 300 // is enabled. |
| 303 TEST_F(TransportDescriptionFactoryTest, TestIceRenominationWithDtls) { | 301 TEST_F(TransportDescriptionFactoryTest, TestIceRenominationWithDtls) { |
| 304 TestIceRenomination(true); | 302 TestIceRenomination(true); |
| 305 } | 303 } |
| OLD | NEW |