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 |
| 11 #include <memory> |
11 #include <utility> | 12 #include <utility> |
12 #include <vector> | 13 #include <vector> |
13 | 14 |
14 #include "webrtc/api/audiotrack.h" | 15 #include "webrtc/api/audiotrack.h" |
15 #include "webrtc/api/fakemediacontroller.h" | 16 #include "webrtc/api/fakemediacontroller.h" |
16 #include "webrtc/api/fakemetricsobserver.h" | 17 #include "webrtc/api/fakemetricsobserver.h" |
17 #include "webrtc/api/jsepicecandidate.h" | 18 #include "webrtc/api/jsepicecandidate.h" |
18 #include "webrtc/api/jsepsessiondescription.h" | 19 #include "webrtc/api/jsepsessiondescription.h" |
19 #include "webrtc/api/peerconnection.h" | 20 #include "webrtc/api/peerconnection.h" |
20 #include "webrtc/api/sctputils.h" | 21 #include "webrtc/api/sctputils.h" |
(...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
685 } | 686 } |
686 } | 687 } |
687 | 688 |
688 // Set the internal fake description factories to do DTLS-SRTP. | 689 // Set the internal fake description factories to do DTLS-SRTP. |
689 void SetFactoryDtlsSrtp() { | 690 void SetFactoryDtlsSrtp() { |
690 desc_factory_->set_secure(cricket::SEC_DISABLED); | 691 desc_factory_->set_secure(cricket::SEC_DISABLED); |
691 std::string identity_name = "WebRTC" + | 692 std::string identity_name = "WebRTC" + |
692 rtc::ToString(rtc::CreateRandomId()); | 693 rtc::ToString(rtc::CreateRandomId()); |
693 // Confirmed to work with KT_RSA and KT_ECDSA. | 694 // Confirmed to work with KT_RSA and KT_ECDSA. |
694 tdesc_factory_->set_certificate( | 695 tdesc_factory_->set_certificate( |
695 rtc::RTCCertificate::Create(rtc::scoped_ptr<rtc::SSLIdentity>( | 696 rtc::RTCCertificate::Create(std::unique_ptr<rtc::SSLIdentity>( |
696 rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)))); | 697 rtc::SSLIdentity::Generate(identity_name, rtc::KT_DEFAULT)))); |
697 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); | 698 tdesc_factory_->set_secure(cricket::SEC_REQUIRED); |
698 } | 699 } |
699 | 700 |
700 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, | 701 void VerifyFingerprintStatus(const cricket::SessionDescription* sdp, |
701 bool expected) { | 702 bool expected) { |
702 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); | 703 const TransportInfo* audio = sdp->GetTransportInfoByName("audio"); |
703 ASSERT_TRUE(audio != NULL); | 704 ASSERT_TRUE(audio != NULL); |
704 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); | 705 ASSERT_EQ(expected, audio->description.identity_fingerprint.get() != NULL); |
705 const TransportInfo* video = sdp->GetTransportInfoByName("video"); | 706 const TransportInfo* video = sdp->GetTransportInfoByName("video"); |
(...skipping 3697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4403 } | 4404 } |
4404 | 4405 |
4405 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test | 4406 // TODO(bemasc): Add a TestIceStatesBundle with BUNDLE enabled. That test |
4406 // currently fails because upon disconnection and reconnection OnIceComplete is | 4407 // currently fails because upon disconnection and reconnection OnIceComplete is |
4407 // called more than once without returning to IceGatheringGathering. | 4408 // called more than once without returning to IceGatheringGathering. |
4408 | 4409 |
4409 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, | 4410 INSTANTIATE_TEST_CASE_P(WebRtcSessionTests, |
4410 WebRtcSessionTest, | 4411 WebRtcSessionTest, |
4411 testing::Values(ALREADY_GENERATED, | 4412 testing::Values(ALREADY_GENERATED, |
4412 DTLS_IDENTITY_STORE)); | 4413 DTLS_IDENTITY_STORE)); |
OLD | NEW |