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

Unified Diff: webrtc/p2p/base/dtlstransportchannel_unittest.cc

Issue 1802013002: A bunch of interfaces: Return scoped_ptr<SSLCertificate> (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: less auto Created 4 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/p2p/base/dtlstransportchannel_unittest.cc
diff --git a/webrtc/p2p/base/dtlstransportchannel_unittest.cc b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
index 18b355ffd4dd859c3e481f9a5f5957cc8afbdc5e..7643016b6a522abee5815386f9566a1a53cfb6ce 100644
--- a/webrtc/p2p/base/dtlstransportchannel_unittest.cc
+++ b/webrtc/p2p/base/dtlstransportchannel_unittest.cc
@@ -855,12 +855,8 @@ TEST_F(DtlsTransportChannelTest, TestCertificatesBeforeConnect) {
ASSERT_TRUE(client2_.transport()->GetLocalCertificate(&certificate2));
ASSERT_NE(certificate1->ssl_certificate().ToPEMString(),
certificate2->ssl_certificate().ToPEMString());
- ASSERT_FALSE(
- client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept()));
- ASSERT_FALSE(remote_cert1 != NULL);
- ASSERT_FALSE(
- client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept()));
- ASSERT_FALSE(remote_cert2 != NULL);
+ ASSERT_FALSE(client1_.transport()->GetRemoteSSLCertificate());
+ ASSERT_FALSE(client2_.transport()->GetRemoteSSLCertificate());
}
// Test Certificates state after connection.
@@ -871,8 +867,6 @@ TEST_F(DtlsTransportChannelTest, TestCertificatesAfterConnect) {
rtc::scoped_refptr<rtc::RTCCertificate> certificate1;
rtc::scoped_refptr<rtc::RTCCertificate> certificate2;
- rtc::scoped_ptr<rtc::SSLCertificate> remote_cert1;
- rtc::scoped_ptr<rtc::SSLCertificate> remote_cert2;
// After connection, each side has a distinct local certificate.
ASSERT_TRUE(client1_.transport()->GetLocalCertificate(&certificate1));
@@ -881,12 +875,14 @@ TEST_F(DtlsTransportChannelTest, TestCertificatesAfterConnect) {
certificate2->ssl_certificate().ToPEMString());
// Each side's remote certificate is the other side's local certificate.
- ASSERT_TRUE(
- client1_.transport()->GetRemoteSSLCertificate(remote_cert1.accept()));
+ rtc::scoped_ptr<rtc::SSLCertificate> remote_cert1 =
+ client1_.transport()->GetRemoteSSLCertificate();
+ ASSERT_TRUE(remote_cert1);
ASSERT_EQ(remote_cert1->ToPEMString(),
certificate2->ssl_certificate().ToPEMString());
- ASSERT_TRUE(
- client2_.transport()->GetRemoteSSLCertificate(remote_cert2.accept()));
+ rtc::scoped_ptr<rtc::SSLCertificate> remote_cert2 =
+ client2_.transport()->GetRemoteSSLCertificate();
+ ASSERT_TRUE(remote_cert2);
ASSERT_EQ(remote_cert2->ToPEMString(),
certificate1->ssl_certificate().ToPEMString());
}
« no previous file with comments | « webrtc/p2p/base/dtlstransportchannel.cc ('k') | webrtc/p2p/base/faketransportcontroller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698