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

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

Issue 1920043002: Replace scoped_ptr with unique_ptr in webrtc/base/ (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 4 years, 8 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
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/api/webrtcsessiondescriptionfactory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
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
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
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));
OLDNEW
« no previous file with comments | « webrtc/api/webrtcsession.cc ('k') | webrtc/api/webrtcsessiondescriptionfactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698