| 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 2231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2242 ASSERT_TRUE(content != NULL); | 2242 ASSERT_TRUE(content != NULL); |
| 2243 EXPECT_FALSE(content->rejected); | 2243 EXPECT_FALSE(content->rejected); |
| 2244 #ifdef HAVE_SCTP | 2244 #ifdef HAVE_SCTP |
| 2245 content = | 2245 content = |
| 2246 cricket::GetFirstDataContent(pc_->local_description()->description()); | 2246 cricket::GetFirstDataContent(pc_->local_description()->description()); |
| 2247 ASSERT_TRUE(content != NULL); | 2247 ASSERT_TRUE(content != NULL); |
| 2248 EXPECT_TRUE(content->rejected); | 2248 EXPECT_TRUE(content->rejected); |
| 2249 #endif | 2249 #endif |
| 2250 } | 2250 } |
| 2251 | 2251 |
| 2252 // Test that an offer can be received which offers DTLS with SDES fallback. | 2252 // Test that fallback from DTLS to SDES is not supported. |
| 2253 // Regression test for issue: | 2253 // The fallback was previously supported but was removed to simplify the code |
| 2254 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6972 | 2254 // and because it's non-standard. |
| 2255 TEST_F(PeerConnectionInterfaceTest, ReceiveDtlsSdesFallbackOffer) { | 2255 TEST_F(PeerConnectionInterfaceTest, DtlsSdesFallbackNotSupported) { |
| 2256 FakeConstraints constraints; | 2256 FakeConstraints constraints; |
| 2257 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2257 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
| 2258 true); | 2258 true); |
| 2259 CreatePeerConnection(&constraints); | 2259 CreatePeerConnection(&constraints); |
| 2260 // Wait for fake certificate to be generated. Previously, this is what caused | 2260 // Wait for fake certificate to be generated. Previously, this is what caused |
| 2261 // the "a=crypto" lines to be rejected. | 2261 // the "a=crypto" lines to be rejected. |
| 2262 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 2262 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
| 2263 ASSERT_NE(nullptr, fake_certificate_generator_); | 2263 ASSERT_NE(nullptr, fake_certificate_generator_); |
| 2264 EXPECT_EQ_WAIT(1, fake_certificate_generator_->generated_certificates(), | 2264 EXPECT_EQ_WAIT(1, fake_certificate_generator_->generated_certificates(), |
| 2265 kTimeout); | 2265 kTimeout); |
| 2266 std::unique_ptr<SessionDescriptionInterface> desc( | 2266 std::unique_ptr<SessionDescriptionInterface> desc( |
| 2267 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, | 2267 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, |
| 2268 kDtlsSdesFallbackSdp, nullptr)); | 2268 kDtlsSdesFallbackSdp, nullptr)); |
| 2269 EXPECT_TRUE(DoSetSessionDescription(std::move(desc), false)); | 2269 EXPECT_FALSE(DoSetSessionDescription(std::move(desc), false)); |
| 2270 CreateAnswerAsLocalDescription(); | |
| 2271 } | 2270 } |
| 2272 | 2271 |
| 2273 // Test that we can create an audio only offer and receive an answer with a | 2272 // Test that we can create an audio only offer and receive an answer with a |
| 2274 // limited set of audio codecs and receive an updated offer with more audio | 2273 // limited set of audio codecs and receive an updated offer with more audio |
| 2275 // codecs, where the added codecs are not supported. | 2274 // codecs, where the added codecs are not supported. |
| 2276 TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) { | 2275 TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) { |
| 2277 CreatePeerConnectionWithoutDtls(); | 2276 CreatePeerConnectionWithoutDtls(); |
| 2278 AddVoiceStream("audio_label"); | 2277 AddVoiceStream("audio_label"); |
| 2279 CreateOfferAsLocalDescription(); | 2278 CreateOfferAsLocalDescription(); |
| 2280 | 2279 |
| (...skipping 1694 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3975 EXPECT_NE(a, f); | 3974 EXPECT_NE(a, f); |
| 3976 | 3975 |
| 3977 PeerConnectionInterface::RTCConfiguration g; | 3976 PeerConnectionInterface::RTCConfiguration g; |
| 3978 g.disable_ipv6 = true; | 3977 g.disable_ipv6 = true; |
| 3979 EXPECT_NE(a, g); | 3978 EXPECT_NE(a, g); |
| 3980 | 3979 |
| 3981 PeerConnectionInterface::RTCConfiguration h( | 3980 PeerConnectionInterface::RTCConfiguration h( |
| 3982 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3981 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
| 3983 EXPECT_NE(a, h); | 3982 EXPECT_NE(a, h); |
| 3984 } | 3983 } |
| OLD | NEW |