| 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 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 286 "a=ssrc:2 msid:stream1 videotrack0\r\n"; | 286 "a=ssrc:2 msid:stream1 videotrack0\r\n"; |
| 287 | 287 |
| 288 static const char kSdpStringMs1Audio1[] = | 288 static const char kSdpStringMs1Audio1[] = |
| 289 "a=ssrc:3 cname:stream1\r\n" | 289 "a=ssrc:3 cname:stream1\r\n" |
| 290 "a=ssrc:3 msid:stream1 audiotrack1\r\n"; | 290 "a=ssrc:3 msid:stream1 audiotrack1\r\n"; |
| 291 | 291 |
| 292 static const char kSdpStringMs1Video1[] = | 292 static const char kSdpStringMs1Video1[] = |
| 293 "a=ssrc:4 cname:stream1\r\n" | 293 "a=ssrc:4 cname:stream1\r\n" |
| 294 "a=ssrc:4 msid:stream1 videotrack1\r\n"; | 294 "a=ssrc:4 msid:stream1 videotrack1\r\n"; |
| 295 | 295 |
| 296 #define MAYBE_SKIP_TEST(feature) \ |
| 297 if (!(feature())) { \ |
| 298 LOG(LS_INFO) << "Feature disabled... skipping"; \ |
| 299 return; \ |
| 300 } |
| 301 |
| 296 using ::testing::Exactly; | 302 using ::testing::Exactly; |
| 297 using cricket::StreamParams; | 303 using cricket::StreamParams; |
| 298 using webrtc::AudioSourceInterface; | 304 using webrtc::AudioSourceInterface; |
| 299 using webrtc::AudioTrack; | 305 using webrtc::AudioTrack; |
| 300 using webrtc::AudioTrackInterface; | 306 using webrtc::AudioTrackInterface; |
| 301 using webrtc::DataBuffer; | 307 using webrtc::DataBuffer; |
| 302 using webrtc::DataChannelInterface; | 308 using webrtc::DataChannelInterface; |
| 303 using webrtc::FakeConstraints; | 309 using webrtc::FakeConstraints; |
| 304 using webrtc::IceCandidateInterface; | 310 using webrtc::IceCandidateInterface; |
| 305 using webrtc::JsepSessionDescription; | 311 using webrtc::JsepSessionDescription; |
| (...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2029 data_info->rejected = true; | 2035 data_info->rejected = true; |
| 2030 | 2036 |
| 2031 DoSetRemoteDescription(answer); | 2037 DoSetRemoteDescription(answer); |
| 2032 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); | 2038 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); |
| 2033 } | 2039 } |
| 2034 | 2040 |
| 2035 // Test that we can create a session description from an SDP string from | 2041 // Test that we can create a session description from an SDP string from |
| 2036 // FireFox, use it as a remote session description, generate an answer and use | 2042 // FireFox, use it as a remote session description, generate an answer and use |
| 2037 // the answer as a local description. | 2043 // the answer as a local description. |
| 2038 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { | 2044 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { |
| 2045 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); |
| 2039 FakeConstraints constraints; | 2046 FakeConstraints constraints; |
| 2040 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2047 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
| 2041 true); | 2048 true); |
| 2042 CreatePeerConnection(&constraints); | 2049 CreatePeerConnection(&constraints); |
| 2043 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 2050 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
| 2044 SessionDescriptionInterface* desc = | 2051 SessionDescriptionInterface* desc = |
| 2045 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, | 2052 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, |
| 2046 webrtc::kFireFoxSdpOffer, nullptr); | 2053 webrtc::kFireFoxSdpOffer, nullptr); |
| 2047 EXPECT_TRUE(DoSetSessionDescription(desc, false)); | 2054 EXPECT_TRUE(DoSetSessionDescription(desc, false)); |
| 2048 CreateAnswerAsLocalDescription(); | 2055 CreateAnswerAsLocalDescription(); |
| (...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3349 EXPECT_NE(a, f); | 3356 EXPECT_NE(a, f); |
| 3350 | 3357 |
| 3351 PeerConnectionInterface::RTCConfiguration g; | 3358 PeerConnectionInterface::RTCConfiguration g; |
| 3352 g.disable_ipv6 = true; | 3359 g.disable_ipv6 = true; |
| 3353 EXPECT_NE(a, g); | 3360 EXPECT_NE(a, g); |
| 3354 | 3361 |
| 3355 PeerConnectionInterface::RTCConfiguration h( | 3362 PeerConnectionInterface::RTCConfiguration h( |
| 3356 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3363 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
| 3357 EXPECT_NE(a, h); | 3364 EXPECT_NE(a, h); |
| 3358 } | 3365 } |
| OLD | NEW |