OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2009 The WebRTC project authors. All Rights Reserved. | 2 * Copyright 2009 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 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
90 // Base class for Voice/Video/RtpDataChannel tests | 90 // Base class for Voice/Video/RtpDataChannel tests |
91 template<class T> | 91 template<class T> |
92 class ChannelTest : public testing::Test, public sigslot::has_slots<> { | 92 class ChannelTest : public testing::Test, public sigslot::has_slots<> { |
93 public: | 93 public: |
94 enum Flags { | 94 enum Flags { |
95 RTCP_MUX = 0x1, | 95 RTCP_MUX = 0x1, |
96 RTCP_MUX_REQUIRED = 0x2, | 96 RTCP_MUX_REQUIRED = 0x2, |
97 SECURE = 0x4, | 97 SECURE = 0x4, |
98 SSRC_MUX = 0x8, | 98 SSRC_MUX = 0x8, |
99 DTLS = 0x10, | 99 DTLS = 0x10, |
100 GCM_CIPHER = 0x20, | |
101 // Use BaseChannel with PacketTransportInternal rather than | 100 // Use BaseChannel with PacketTransportInternal rather than |
102 // DtlsTransportInternal. | 101 // DtlsTransportInternal. |
103 RAW_PACKET_TRANSPORT = 0x40, | 102 RAW_PACKET_TRANSPORT = 0x20, |
104 }; | 103 }; |
105 | 104 |
106 ChannelTest(bool verify_playout, | 105 ChannelTest(bool verify_playout, |
107 rtc::ArrayView<const uint8_t> rtp_data, | 106 rtc::ArrayView<const uint8_t> rtp_data, |
108 rtc::ArrayView<const uint8_t> rtcp_data, | 107 rtc::ArrayView<const uint8_t> rtcp_data, |
109 NetworkIsWorker network_is_worker) | 108 NetworkIsWorker network_is_worker) |
110 : verify_playout_(verify_playout), | 109 : verify_playout_(verify_playout), |
111 rtp_packet_(rtp_data.data(), rtp_data.size()), | 110 rtp_packet_(rtp_data.data(), rtp_data.size()), |
112 rtcp_packet_(rtcp_data.data(), rtcp_data.size()) { | 111 rtcp_packet_(rtcp_data.data(), rtcp_data.size()) { |
113 if (network_is_worker == NetworkIsWorker::Yes) { | 112 if (network_is_worker == NetworkIsWorker::Yes) { |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
256 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, | 255 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, |
257 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, | 256 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, |
258 rtc::PacketTransportInternal* fake_rtp_packet_transport, | 257 rtc::PacketTransportInternal* fake_rtp_packet_transport, |
259 rtc::PacketTransportInternal* fake_rtcp_packet_transport, | 258 rtc::PacketTransportInternal* fake_rtcp_packet_transport, |
260 int flags) { | 259 int flags) { |
261 rtc::Thread* signaling_thread = rtc::Thread::Current(); | 260 rtc::Thread* signaling_thread = rtc::Thread::Current(); |
262 typename T::Channel* channel = new typename T::Channel( | 261 typename T::Channel* channel = new typename T::Channel( |
263 worker_thread, network_thread, signaling_thread, engine, ch, | 262 worker_thread, network_thread, signaling_thread, engine, ch, |
264 cricket::CN_AUDIO, (flags & RTCP_MUX_REQUIRED) != 0, | 263 cricket::CN_AUDIO, (flags & RTCP_MUX_REQUIRED) != 0, |
265 (flags & SECURE) != 0); | 264 (flags & SECURE) != 0); |
266 rtc::CryptoOptions crypto_options; | |
267 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | |
268 channel->SetCryptoOptions(crypto_options); | |
269 if (!channel->NeedsRtcpTransport()) { | 265 if (!channel->NeedsRtcpTransport()) { |
270 fake_rtcp_dtls_transport = nullptr; | 266 fake_rtcp_dtls_transport = nullptr; |
271 } | 267 } |
272 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, | 268 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, |
273 fake_rtp_packet_transport, | 269 fake_rtp_packet_transport, |
274 fake_rtcp_packet_transport)) { | 270 fake_rtcp_packet_transport)) { |
275 delete channel; | 271 delete channel; |
276 channel = NULL; | 272 channel = NULL; |
277 } | 273 } |
278 return channel; | 274 return channel; |
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
462 } | 458 } |
463 bool CheckNoRtp2() { | 459 bool CheckNoRtp2() { |
464 return media_channel2_->CheckNoRtp(); | 460 return media_channel2_->CheckNoRtp(); |
465 } | 461 } |
466 bool CheckNoRtcp1() { | 462 bool CheckNoRtcp1() { |
467 return media_channel1_->CheckNoRtcp(); | 463 return media_channel1_->CheckNoRtcp(); |
468 } | 464 } |
469 bool CheckNoRtcp2() { | 465 bool CheckNoRtcp2() { |
470 return media_channel2_->CheckNoRtcp(); | 466 return media_channel2_->CheckNoRtcp(); |
471 } | 467 } |
472 // Checks that the channel is using GCM iff GCM_CIPHER is set in flags. | |
473 // Returns true if so. | |
474 bool CheckGcmCipher(typename T::Channel* channel, int flags) { | |
475 int suite; | |
476 cricket::FakeDtlsTransport* transport = | |
477 (channel == channel1_.get()) ? fake_rtp_dtls_transport1_.get() | |
478 : fake_rtp_dtls_transport2_.get(); | |
479 RTC_DCHECK(transport); | |
480 if (!transport->GetSrtpCryptoSuite(&suite)) { | |
481 return false; | |
482 } | |
483 | |
484 if (flags & GCM_CIPHER) { | |
485 return rtc::IsGcmCryptoSuite(suite); | |
486 } else { | |
487 return (suite != rtc::SRTP_INVALID_CRYPTO_SUITE && | |
488 !rtc::IsGcmCryptoSuite(suite)); | |
489 } | |
490 } | |
491 | 468 |
492 void CreateContent(int flags, | 469 void CreateContent(int flags, |
493 const cricket::AudioCodec& audio_codec, | 470 const cricket::AudioCodec& audio_codec, |
494 const cricket::VideoCodec& video_codec, | 471 const cricket::VideoCodec& video_codec, |
495 typename T::Content* content) { | 472 typename T::Content* content) { |
496 // overridden in specialized classes | 473 // overridden in specialized classes |
497 } | 474 } |
498 void CopyContent(const typename T::Content& source, | 475 void CopyContent(const typename T::Content& source, |
499 typename T::Content* content) { | 476 typename T::Content* content) { |
500 // overridden in specialized classes | 477 // overridden in specialized classes |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1332 EXPECT_FALSE(channel1_->NeedsRtcpTransport()); | 1309 EXPECT_FALSE(channel1_->NeedsRtcpTransport()); |
1333 EXPECT_EQ(1, rtcp_mux_activated_callbacks1_); | 1310 EXPECT_EQ(1, rtcp_mux_activated_callbacks1_); |
1334 SendRtcp1(); | 1311 SendRtcp1(); |
1335 SendRtcp2(); | 1312 SendRtcp2(); |
1336 WaitForThreads(); | 1313 WaitForThreads(); |
1337 EXPECT_TRUE(CheckRtcp2()); | 1314 EXPECT_TRUE(CheckRtcp2()); |
1338 EXPECT_TRUE(CheckRtcp1()); | 1315 EXPECT_TRUE(CheckRtcp1()); |
1339 } | 1316 } |
1340 | 1317 |
1341 // Test that we properly send SRTP with RTCP in both directions. | 1318 // Test that we properly send SRTP with RTCP in both directions. |
1342 // You can pass in DTLS, RTCP_MUX, GCM_CIPHER and RAW_PACKET_TRANSPORT as | 1319 // You can pass in DTLS, RTCP_MUX, and RAW_PACKET_TRANSPORT as flags. |
1343 // flags. | |
1344 void SendSrtpToSrtp(int flags1_in = 0, int flags2_in = 0) { | 1320 void SendSrtpToSrtp(int flags1_in = 0, int flags2_in = 0) { |
1345 RTC_CHECK((flags1_in & | 1321 RTC_CHECK((flags1_in & ~(RTCP_MUX | DTLS | RAW_PACKET_TRANSPORT)) == 0); |
1346 ~(RTCP_MUX | DTLS | GCM_CIPHER | RAW_PACKET_TRANSPORT)) == 0); | 1322 RTC_CHECK((flags2_in & ~(RTCP_MUX | DTLS | RAW_PACKET_TRANSPORT)) == 0); |
1347 RTC_CHECK((flags2_in & | |
1348 ~(RTCP_MUX | DTLS | GCM_CIPHER | RAW_PACKET_TRANSPORT)) == 0); | |
1349 | 1323 |
1350 int flags1 = SECURE | flags1_in; | 1324 int flags1 = SECURE | flags1_in; |
1351 int flags2 = SECURE | flags2_in; | 1325 int flags2 = SECURE | flags2_in; |
1352 bool dtls1 = !!(flags1_in & DTLS); | 1326 bool dtls1 = !!(flags1_in & DTLS); |
1353 bool dtls2 = !!(flags2_in & DTLS); | 1327 bool dtls2 = !!(flags2_in & DTLS); |
1354 CreateChannels(flags1, flags2); | 1328 CreateChannels(flags1, flags2); |
1355 EXPECT_FALSE(channel1_->secure()); | 1329 EXPECT_FALSE(channel1_->secure()); |
1356 EXPECT_FALSE(channel2_->secure()); | 1330 EXPECT_FALSE(channel2_->secure()); |
1357 EXPECT_TRUE(SendInitiate()); | 1331 EXPECT_TRUE(SendInitiate()); |
1358 WaitForThreads(); | 1332 WaitForThreads(); |
1359 EXPECT_TRUE(channel1_->writable()); | 1333 EXPECT_TRUE(channel1_->writable()); |
1360 EXPECT_TRUE(channel2_->writable()); | 1334 EXPECT_TRUE(channel2_->writable()); |
1361 EXPECT_TRUE(SendAccept()); | 1335 EXPECT_TRUE(SendAccept()); |
1362 EXPECT_TRUE(channel1_->secure()); | 1336 EXPECT_TRUE(channel1_->secure()); |
1363 EXPECT_TRUE(channel2_->secure()); | 1337 EXPECT_TRUE(channel2_->secure()); |
1364 EXPECT_EQ(dtls1 && dtls2, channel1_->secure_dtls()); | 1338 EXPECT_EQ(dtls1 && dtls2, channel1_->secure_dtls()); |
1365 EXPECT_EQ(dtls1 && dtls2, channel2_->secure_dtls()); | 1339 EXPECT_EQ(dtls1 && dtls2, channel2_->secure_dtls()); |
1366 // We can only query the negotiated cipher suite for DTLS-SRTP transport | |
1367 // channels. | |
1368 if (dtls1 && dtls2) { | |
1369 // A GCM cipher is only used if both channels support GCM ciphers. | |
1370 int common_gcm_flags = flags1 & flags2 & GCM_CIPHER; | |
1371 EXPECT_TRUE(CheckGcmCipher(channel1_.get(), common_gcm_flags)); | |
1372 EXPECT_TRUE(CheckGcmCipher(channel2_.get(), common_gcm_flags)); | |
1373 } | |
1374 SendRtp1(); | 1340 SendRtp1(); |
1375 SendRtp2(); | 1341 SendRtp2(); |
1376 SendRtcp1(); | 1342 SendRtcp1(); |
1377 SendRtcp2(); | 1343 SendRtcp2(); |
1378 WaitForThreads(); | 1344 WaitForThreads(); |
1379 EXPECT_TRUE(CheckRtp1()); | 1345 EXPECT_TRUE(CheckRtp1()); |
1380 EXPECT_TRUE(CheckRtp2()); | 1346 EXPECT_TRUE(CheckRtp2()); |
1381 EXPECT_TRUE(CheckNoRtp1()); | 1347 EXPECT_TRUE(CheckNoRtp1()); |
1382 EXPECT_TRUE(CheckNoRtp2()); | 1348 EXPECT_TRUE(CheckNoRtp2()); |
1383 EXPECT_TRUE(CheckRtcp1()); | 1349 EXPECT_TRUE(CheckRtcp1()); |
(...skipping 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2117 cricket::FakeVideoMediaChannel* ch, | 2083 cricket::FakeVideoMediaChannel* ch, |
2118 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, | 2084 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, |
2119 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, | 2085 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, |
2120 rtc::PacketTransportInternal* fake_rtp_packet_transport, | 2086 rtc::PacketTransportInternal* fake_rtp_packet_transport, |
2121 rtc::PacketTransportInternal* fake_rtcp_packet_transport, | 2087 rtc::PacketTransportInternal* fake_rtcp_packet_transport, |
2122 int flags) { | 2088 int flags) { |
2123 rtc::Thread* signaling_thread = rtc::Thread::Current(); | 2089 rtc::Thread* signaling_thread = rtc::Thread::Current(); |
2124 cricket::VideoChannel* channel = new cricket::VideoChannel( | 2090 cricket::VideoChannel* channel = new cricket::VideoChannel( |
2125 worker_thread, network_thread, signaling_thread, ch, cricket::CN_VIDEO, | 2091 worker_thread, network_thread, signaling_thread, ch, cricket::CN_VIDEO, |
2126 (flags & RTCP_MUX_REQUIRED) != 0, (flags & SECURE) != 0); | 2092 (flags & RTCP_MUX_REQUIRED) != 0, (flags & SECURE) != 0); |
2127 rtc::CryptoOptions crypto_options; | |
2128 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | |
2129 channel->SetCryptoOptions(crypto_options); | |
2130 if (!channel->NeedsRtcpTransport()) { | 2093 if (!channel->NeedsRtcpTransport()) { |
2131 fake_rtcp_dtls_transport = nullptr; | 2094 fake_rtcp_dtls_transport = nullptr; |
2132 } | 2095 } |
2133 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, | 2096 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, |
2134 fake_rtp_packet_transport, fake_rtcp_packet_transport)) { | 2097 fake_rtp_packet_transport, fake_rtcp_packet_transport)) { |
2135 delete channel; | 2098 delete channel; |
2136 channel = NULL; | 2099 channel = NULL; |
2137 } | 2100 } |
2138 return channel; | 2101 return channel; |
2139 } | 2102 } |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2342 } | 2305 } |
2343 | 2306 |
2344 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToSrtp) { | 2307 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToSrtp) { |
2345 Base::SendSrtpToSrtp(DTLS, 0); | 2308 Base::SendSrtpToSrtp(DTLS, 0); |
2346 } | 2309 } |
2347 | 2310 |
2348 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtp) { | 2311 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtp) { |
2349 Base::SendSrtpToSrtp(DTLS, DTLS); | 2312 Base::SendSrtpToSrtp(DTLS, DTLS); |
2350 } | 2313 } |
2351 | 2314 |
2352 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtpGcmBoth) { | |
2353 Base::SendSrtpToSrtp(DTLS | GCM_CIPHER, DTLS | GCM_CIPHER); | |
2354 } | |
2355 | |
2356 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtpGcmOne) { | |
2357 Base::SendSrtpToSrtp(DTLS | GCM_CIPHER, DTLS); | |
2358 } | |
2359 | |
2360 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtpGcmTwo) { | |
2361 Base::SendSrtpToSrtp(DTLS, DTLS | GCM_CIPHER); | |
2362 } | |
2363 | |
2364 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtpRtcpMux) { | 2315 TEST_F(VoiceChannelSingleThreadTest, SendDtlsSrtpToDtlsSrtpRtcpMux) { |
2365 Base::SendSrtpToSrtp(DTLS | RTCP_MUX, DTLS | RTCP_MUX); | 2316 Base::SendSrtpToSrtp(DTLS | RTCP_MUX, DTLS | RTCP_MUX); |
2366 } | 2317 } |
2367 | 2318 |
2368 // Test using the channel with a raw packet interface, as opposed to a DTLS | 2319 // Test using the channel with a raw packet interface, as opposed to a DTLS |
2369 // transport interface. | 2320 // transport interface. |
2370 TEST_F(VoiceChannelSingleThreadTest, SendSrtpToSrtpWithRawPacketTransport) { | 2321 TEST_F(VoiceChannelSingleThreadTest, SendSrtpToSrtpWithRawPacketTransport) { |
2371 Base::SendSrtpToSrtp(RAW_PACKET_TRANSPORT, RAW_PACKET_TRANSPORT); | 2322 Base::SendSrtpToSrtp(RAW_PACKET_TRANSPORT, RAW_PACKET_TRANSPORT); |
2372 } | 2323 } |
2373 | 2324 |
(...skipping 301 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2675 } | 2626 } |
2676 | 2627 |
2677 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToSrtp) { | 2628 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToSrtp) { |
2678 Base::SendSrtpToSrtp(DTLS, 0); | 2629 Base::SendSrtpToSrtp(DTLS, 0); |
2679 } | 2630 } |
2680 | 2631 |
2681 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtp) { | 2632 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtp) { |
2682 Base::SendSrtpToSrtp(DTLS, DTLS); | 2633 Base::SendSrtpToSrtp(DTLS, DTLS); |
2683 } | 2634 } |
2684 | 2635 |
2685 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtpGcmBoth) { | |
2686 Base::SendSrtpToSrtp(DTLS | GCM_CIPHER, DTLS | GCM_CIPHER); | |
2687 } | |
2688 | |
2689 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtpGcmOne) { | |
2690 Base::SendSrtpToSrtp(DTLS | GCM_CIPHER, DTLS); | |
2691 } | |
2692 | |
2693 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtpGcmTwo) { | |
2694 Base::SendSrtpToSrtp(DTLS, DTLS | GCM_CIPHER); | |
2695 } | |
2696 | |
2697 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtpRtcpMux) { | 2636 TEST_F(VoiceChannelDoubleThreadTest, SendDtlsSrtpToDtlsSrtpRtcpMux) { |
2698 Base::SendSrtpToSrtp(DTLS | RTCP_MUX, DTLS | RTCP_MUX); | 2637 Base::SendSrtpToSrtp(DTLS | RTCP_MUX, DTLS | RTCP_MUX); |
2699 } | 2638 } |
2700 | 2639 |
2701 // Test using the channel with a raw packet interface, as opposed to a DTLS | 2640 // Test using the channel with a raw packet interface, as opposed to a DTLS |
2702 // transport interface. | 2641 // transport interface. |
2703 TEST_F(VoiceChannelDoubleThreadTest, SendSrtpToSrtpWithRawPacketTransport) { | 2642 TEST_F(VoiceChannelDoubleThreadTest, SendSrtpToSrtpWithRawPacketTransport) { |
2704 Base::SendSrtpToSrtp(RAW_PACKET_TRANSPORT, RAW_PACKET_TRANSPORT); | 2643 Base::SendSrtpToSrtp(RAW_PACKET_TRANSPORT, RAW_PACKET_TRANSPORT); |
2705 } | 2644 } |
2706 | 2645 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3361 cricket::FakeDataMediaChannel* ch, | 3300 cricket::FakeDataMediaChannel* ch, |
3362 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, | 3301 cricket::DtlsTransportInternal* fake_rtp_dtls_transport, |
3363 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, | 3302 cricket::DtlsTransportInternal* fake_rtcp_dtls_transport, |
3364 rtc::PacketTransportInternal* fake_rtp_packet_transport, | 3303 rtc::PacketTransportInternal* fake_rtp_packet_transport, |
3365 rtc::PacketTransportInternal* fake_rtcp_packet_transport, | 3304 rtc::PacketTransportInternal* fake_rtcp_packet_transport, |
3366 int flags) { | 3305 int flags) { |
3367 rtc::Thread* signaling_thread = rtc::Thread::Current(); | 3306 rtc::Thread* signaling_thread = rtc::Thread::Current(); |
3368 cricket::RtpDataChannel* channel = new cricket::RtpDataChannel( | 3307 cricket::RtpDataChannel* channel = new cricket::RtpDataChannel( |
3369 worker_thread, network_thread, signaling_thread, ch, cricket::CN_DATA, | 3308 worker_thread, network_thread, signaling_thread, ch, cricket::CN_DATA, |
3370 (flags & RTCP_MUX_REQUIRED) != 0, (flags & SECURE) != 0); | 3309 (flags & RTCP_MUX_REQUIRED) != 0, (flags & SECURE) != 0); |
3371 rtc::CryptoOptions crypto_options; | |
3372 crypto_options.enable_gcm_crypto_suites = (flags & GCM_CIPHER) != 0; | |
3373 channel->SetCryptoOptions(crypto_options); | |
3374 if (!channel->NeedsRtcpTransport()) { | 3310 if (!channel->NeedsRtcpTransport()) { |
3375 fake_rtcp_dtls_transport = nullptr; | 3311 fake_rtcp_dtls_transport = nullptr; |
3376 } | 3312 } |
3377 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, | 3313 if (!channel->Init_w(fake_rtp_dtls_transport, fake_rtcp_dtls_transport, |
3378 fake_rtp_packet_transport, fake_rtcp_packet_transport)) { | 3314 fake_rtp_packet_transport, fake_rtcp_packet_transport)) { |
3379 delete channel; | 3315 delete channel; |
3380 channel = NULL; | 3316 channel = NULL; |
3381 } | 3317 } |
3382 return channel; | 3318 return channel; |
3383 } | 3319 } |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3785 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, | 3721 ASSERT_TRUE(voice_channel_.Init_w(nullptr, nullptr, &fake_rtp_dtls_transport_, |
3786 &fake_rtcp_dtls_transport_)); | 3722 &fake_rtcp_dtls_transport_)); |
3787 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, | 3723 EXPECT_DEATH(voice_channel_.SetTransports(&fake_rtp_dtls_transport_, |
3788 &fake_rtp_dtls_transport_), | 3724 &fake_rtp_dtls_transport_), |
3789 ""); | 3725 ""); |
3790 } | 3726 } |
3791 | 3727 |
3792 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) | 3728 #endif // RTC_DCHECK_IS_ON && GTEST_HAS_DEATH_TEST && !defined(WEBRTC_ANDROID) |
3793 | 3729 |
3794 // TODO(pthatcher): TestSetReceiver? | 3730 // TODO(pthatcher): TestSetReceiver? |
OLD | NEW |