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 2230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2241 ASSERT_TRUE(content != NULL); | 2241 ASSERT_TRUE(content != NULL); |
2242 EXPECT_FALSE(content->rejected); | 2242 EXPECT_FALSE(content->rejected); |
2243 #ifdef HAVE_SCTP | 2243 #ifdef HAVE_SCTP |
2244 content = | 2244 content = |
2245 cricket::GetFirstDataContent(pc_->local_description()->description()); | 2245 cricket::GetFirstDataContent(pc_->local_description()->description()); |
2246 ASSERT_TRUE(content != NULL); | 2246 ASSERT_TRUE(content != NULL); |
2247 EXPECT_TRUE(content->rejected); | 2247 EXPECT_TRUE(content->rejected); |
2248 #endif | 2248 #endif |
2249 } | 2249 } |
2250 | 2250 |
2251 // Test that an offer can be received which offers DTLS with SDES fallback. | 2251 // Test that fallback from DTLS to SDES is not supported. |
Taylor Brandstetter
2017/09/11 20:31:16
Can you mention in the comment that this functiona
| |
2252 // Regression test for issue: | 2252 TEST_F(PeerConnectionInterfaceTest, DtlsSdesFallbackNotSupport) { |
Taylor Brandstetter
2017/09/11 20:31:16
nit: "NotSupported" instead of "NotSupport"
| |
2253 // https://bugs.chromium.org/p/webrtc/issues/detail?id=6972 | |
2254 TEST_F(PeerConnectionInterfaceTest, ReceiveDtlsSdesFallbackOffer) { | |
2255 FakeConstraints constraints; | 2253 FakeConstraints constraints; |
2256 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2254 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
2257 true); | 2255 true); |
2258 CreatePeerConnection(&constraints); | 2256 CreatePeerConnection(&constraints); |
2259 // Wait for fake certificate to be generated. Previously, this is what caused | 2257 // Wait for fake certificate to be generated. Previously, this is what caused |
2260 // the "a=crypto" lines to be rejected. | 2258 // the "a=crypto" lines to be rejected. |
2261 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 2259 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
2262 ASSERT_NE(nullptr, fake_certificate_generator_); | 2260 ASSERT_NE(nullptr, fake_certificate_generator_); |
2263 EXPECT_EQ_WAIT(1, fake_certificate_generator_->generated_certificates(), | 2261 EXPECT_EQ_WAIT(1, fake_certificate_generator_->generated_certificates(), |
2264 kTimeout); | 2262 kTimeout); |
2265 SessionDescriptionInterface* desc = webrtc::CreateSessionDescription( | 2263 SessionDescriptionInterface* desc = webrtc::CreateSessionDescription( |
2266 SessionDescriptionInterface::kOffer, kDtlsSdesFallbackSdp, nullptr); | 2264 SessionDescriptionInterface::kOffer, kDtlsSdesFallbackSdp, nullptr); |
2267 EXPECT_TRUE(DoSetSessionDescription(desc, false)); | 2265 EXPECT_FALSE(DoSetSessionDescription(desc, false)); |
2268 CreateAnswerAsLocalDescription(); | |
2269 } | 2266 } |
2270 | 2267 |
2271 // Test that we can create an audio only offer and receive an answer with a | 2268 // Test that we can create an audio only offer and receive an answer with a |
2272 // limited set of audio codecs and receive an updated offer with more audio | 2269 // limited set of audio codecs and receive an updated offer with more audio |
2273 // codecs, where the added codecs are not supported. | 2270 // codecs, where the added codecs are not supported. |
2274 TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) { | 2271 TEST_F(PeerConnectionInterfaceTest, ReceiveUpdatedAudioOfferWithBadCodecs) { |
2275 CreatePeerConnectionWithoutDtls(); | 2272 CreatePeerConnectionWithoutDtls(); |
2276 AddVoiceStream("audio_label"); | 2273 AddVoiceStream("audio_label"); |
2277 CreateOfferAsLocalDescription(); | 2274 CreateOfferAsLocalDescription(); |
2278 | 2275 |
(...skipping 1652 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3931 EXPECT_NE(a, f); | 3928 EXPECT_NE(a, f); |
3932 | 3929 |
3933 PeerConnectionInterface::RTCConfiguration g; | 3930 PeerConnectionInterface::RTCConfiguration g; |
3934 g.disable_ipv6 = true; | 3931 g.disable_ipv6 = true; |
3935 EXPECT_NE(a, g); | 3932 EXPECT_NE(a, g); |
3936 | 3933 |
3937 PeerConnectionInterface::RTCConfiguration h( | 3934 PeerConnectionInterface::RTCConfiguration h( |
3938 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3935 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
3939 EXPECT_NE(a, h); | 3936 EXPECT_NE(a, h); |
3940 } | 3937 } |
OLD | NEW |