Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(198)

Side by Side Diff: webrtc/api/peerconnectioninterface_unittest.cc

Issue 2640513002: Relanding: Removing #defines previously used for building without BoringSSL/OpenSSL. (Closed)
Patch Set: Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
302 using ::testing::Exactly; 296 using ::testing::Exactly;
303 using cricket::StreamParams; 297 using cricket::StreamParams;
304 using webrtc::AudioSourceInterface; 298 using webrtc::AudioSourceInterface;
305 using webrtc::AudioTrack; 299 using webrtc::AudioTrack;
306 using webrtc::AudioTrackInterface; 300 using webrtc::AudioTrackInterface;
307 using webrtc::DataBuffer; 301 using webrtc::DataBuffer;
308 using webrtc::DataChannelInterface; 302 using webrtc::DataChannelInterface;
309 using webrtc::FakeConstraints; 303 using webrtc::FakeConstraints;
310 using webrtc::IceCandidateInterface; 304 using webrtc::IceCandidateInterface;
311 using webrtc::JsepSessionDescription; 305 using webrtc::JsepSessionDescription;
(...skipping 1723 matching lines...) Expand 10 before | Expand all | Expand 10 after
2035 data_info->rejected = true; 2029 data_info->rejected = true;
2036 2030
2037 DoSetRemoteDescription(answer); 2031 DoSetRemoteDescription(answer);
2038 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state()); 2032 EXPECT_EQ(DataChannelInterface::kClosed, offer_channel->state());
2039 } 2033 }
2040 2034
2041 // Test that we can create a session description from an SDP string from 2035 // Test that we can create a session description from an SDP string from
2042 // FireFox, use it as a remote session description, generate an answer and use 2036 // FireFox, use it as a remote session description, generate an answer and use
2043 // the answer as a local description. 2037 // the answer as a local description.
2044 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) { 2038 TEST_F(PeerConnectionInterfaceTest, ReceiveFireFoxOffer) {
2045 MAYBE_SKIP_TEST(rtc::SSLStreamAdapter::HaveDtlsSrtp);
2046 FakeConstraints constraints; 2039 FakeConstraints constraints;
2047 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp, 2040 constraints.AddMandatory(webrtc::MediaConstraintsInterface::kEnableDtlsSrtp,
2048 true); 2041 true);
2049 CreatePeerConnection(&constraints); 2042 CreatePeerConnection(&constraints);
2050 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label"); 2043 AddAudioVideoStream(kStreamLabel1, "audio_label", "video_label");
2051 SessionDescriptionInterface* desc = 2044 SessionDescriptionInterface* desc =
2052 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer, 2045 webrtc::CreateSessionDescription(SessionDescriptionInterface::kOffer,
2053 webrtc::kFireFoxSdpOffer, nullptr); 2046 webrtc::kFireFoxSdpOffer, nullptr);
2054 EXPECT_TRUE(DoSetSessionDescription(desc, false)); 2047 EXPECT_TRUE(DoSetSessionDescription(desc, false));
2055 CreateAnswerAsLocalDescription(); 2048 CreateAnswerAsLocalDescription();
(...skipping 1300 matching lines...) Expand 10 before | Expand all | Expand 10 after
3356 EXPECT_NE(a, f); 3349 EXPECT_NE(a, f);
3357 3350
3358 PeerConnectionInterface::RTCConfiguration g; 3351 PeerConnectionInterface::RTCConfiguration g;
3359 g.disable_ipv6 = true; 3352 g.disable_ipv6 = true;
3360 EXPECT_NE(a, g); 3353 EXPECT_NE(a, g);
3361 3354
3362 PeerConnectionInterface::RTCConfiguration h( 3355 PeerConnectionInterface::RTCConfiguration h(
3363 PeerConnectionInterface::RTCConfigurationType::kAggressive); 3356 PeerConnectionInterface::RTCConfigurationType::kAggressive);
3364 EXPECT_NE(a, h); 3357 EXPECT_NE(a, h);
3365 } 3358 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698