| 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 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 "a=ice-ufrag:e5785931\r\n" | 311 "a=ice-ufrag:e5785931\r\n" |
| 312 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" | 312 "a=ice-pwd:36fb7878390db89481c1d46daa4278d8\r\n" |
| 313 "a=rtpmap:0 pcmu/8000\r\n" | 313 "a=rtpmap:0 pcmu/8000\r\n" |
| 314 "a=fingerprint:sha-1 " | 314 "a=fingerprint:sha-1 " |
| 315 "4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB\r\n" | 315 "4A:AD:B9:B1:3F:82:18:3B:54:02:12:DF:3E:5D:49:6B:19:E5:7C:AB\r\n" |
| 316 "a=setup:actpass\r\n" | 316 "a=setup:actpass\r\n" |
| 317 "a=crypto:1 AES_CM_128_HMAC_SHA1_32 " | 317 "a=crypto:1 AES_CM_128_HMAC_SHA1_32 " |
| 318 "inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj|2^20|1:32 " | 318 "inline:NzB4d1BINUAvLEw6UzF3WSJ+PSdFcGdUJShpX1Zj|2^20|1:32 " |
| 319 "dummy_session_params\r\n"; | 319 "dummy_session_params\r\n"; |
| 320 | 320 |
| 321 #define MAYBE_SKIP_TEST(feature) \ | |
| 322 if (!(feature())) { \ | |
| 323 LOG(LS_INFO) << "Feature disabled... skipping"; \ | |
| 324 return; \ | |
| 325 } | |
| 326 | |
| 327 using ::testing::Exactly; | 321 using ::testing::Exactly; |
| 328 using cricket::StreamParams; | 322 using cricket::StreamParams; |
| 329 using webrtc::AudioSourceInterface; | 323 using webrtc::AudioSourceInterface; |
| 330 using webrtc::AudioTrack; | 324 using webrtc::AudioTrack; |
| 331 using webrtc::AudioTrackInterface; | 325 using webrtc::AudioTrackInterface; |
| 332 using webrtc::DataBuffer; | 326 using webrtc::DataBuffer; |
| 333 using webrtc::DataChannelInterface; | 327 using webrtc::DataChannelInterface; |
| 334 using webrtc::FakeConstraints; | 328 using webrtc::FakeConstraints; |
| 335 using webrtc::IceCandidateInterface; | 329 using webrtc::IceCandidateInterface; |
| 336 using webrtc::JsepSessionDescription; | 330 using webrtc::JsepSessionDescription; |
| (...skipping 1725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2062 data_info->rejected = true; | 2056 data_info->rejected = true; |
| 2063 | 2057 |
| 2064 DoSetRemoteDescription(answer); | 2058 DoSetRemoteDescription(answer); |
| 2065 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); | 2059 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); |
| 2066 } | 2060 } |
| 2067 | 2061 |
| 2068 // Test that we can create a session description from an SDP string from | 2062 // Test that we can create a session description from an SDP string from |
| 2069 // FireFox, use it as a remote session description, generate an answer and use | 2063 // FireFox, use it as a remote session description, generate an answer and use |
| 2070 // the answer as a local description. | 2064 // the answer as a local description. |
| 2071 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { | 2065 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { |
| 2072 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp); | |
| 2073 FakeConstraints constraints; | 2066 FakeConstraints constraints; |
| 2074 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, | 2067 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, |
| 2075 true); | 2068 true); |
| 2076 CreatePeerConnection(&constraints); | 2069 CreatePeerConnection(&constraints); |
| 2077 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); | 2070 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); |
| 2078 SessionDescriptionInterface* desc = | 2071 SessionDescriptionInterface* desc = |
| 2079 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, | 2072 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, |
| 2080 webrtc::kFireFoxSdpOffer, nullptr); | 2073 webrtc::kFireFoxSdpOffer, nullptr); |
| 2081 EXPECT_TRUE(DoSetSessionDescription(desc, false)); | 2074 EXPECT_TRUE(DoSetSessionDescription(desc, false)); |
| 2082 CreateAnswerAsLocalDescription(); | 2075 CreateAnswerAsLocalDescription(); |
| (...skipping 1320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3403 EXPECT_NE(a, f); | 3396 EXPECT_NE(a, f); |
| 3404 | 3397 |
| 3405 PeerConnectionInterface::RTCConfiguration g; | 3398 PeerConnectionInterface::RTCConfiguration g; |
| 3406 g.disable_ipv6 = true; | 3399 g.disable_ipv6 = true; |
| 3407 EXPECT_NE(a, g); | 3400 EXPECT_NE(a, g); |
| 3408 | 3401 |
| 3409 PeerConnectionInterface::RTCConfiguration h( | 3402 PeerConnectionInterface::RTCConfiguration h( |
| 3410 PeerConnectionInterface::RTCConfigurationType::kAggressive); | 3403 PeerConnectionInterface::RTCConfigurationType::kAggressive); |
| 3411 EXPECT_NE(a, h); | 3404 EXPECT_NE(a, h); |
| 3412 } | 3405 } |
| OLD | NEW |