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

Unified Diff: net/cert/test_root_certs_unittest.cc

Issue 17948002: Update Linux to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 6 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 | « net/cert/nss_cert_database.cc ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/test_root_certs_unittest.cc
diff --git a/net/cert/test_root_certs_unittest.cc b/net/cert/test_root_certs_unittest.cc
index b83fe25184e1dac115716d4de2b3334ddfb09153..74c3551862bc6f787f40c250f978c24854e27cf8 100644
--- a/net/cert/test_root_certs_unittest.cc
+++ b/net/cert/test_root_certs_unittest.cc
@@ -33,13 +33,13 @@ const char kGoodCertificateFile[] = "ok_cert.pem";
TEST(TestRootCertsTest, AddFromPointer) {
scoped_refptr<X509Certificate> root_cert =
ImportCertFromFile(GetTestCertsDirectory(), kRootCertificateFile);
- ASSERT_NE(static_cast<X509Certificate*>(NULL), root_cert);
+ ASSERT_NE(static_cast<X509Certificate*>(NULL), root_cert.get());
TestRootCerts* test_roots = TestRootCerts::GetInstance();
ASSERT_NE(static_cast<TestRootCerts*>(NULL), test_roots);
EXPECT_TRUE(test_roots->IsEmpty());
- EXPECT_TRUE(test_roots->Add(root_cert));
+ EXPECT_TRUE(test_roots->Add(root_cert.get()));
EXPECT_FALSE(test_roots->IsEmpty());
test_roots->Clear();
@@ -82,14 +82,14 @@ TEST(TestRootCertsTest, OverrideTrust) {
scoped_refptr<X509Certificate> test_cert =
ImportCertFromFile(GetTestCertsDirectory(), kGoodCertificateFile);
- ASSERT_NE(static_cast<X509Certificate*>(NULL), test_cert);
+ ASSERT_NE(static_cast<X509Certificate*>(NULL), test_cert.get());
// Test that the good certificate fails verification, because the root
// certificate should not yet be trusted.
int flags = 0;
CertVerifyResult bad_verify_result;
scoped_refptr<CertVerifyProc> verify_proc(CertVerifyProc::CreateDefault());
- int bad_status = verify_proc->Verify(test_cert,
+ int bad_status = verify_proc->Verify(test_cert.get(),
"127.0.0.1",
flags,
NULL,
@@ -106,7 +106,7 @@ TEST(TestRootCertsTest, OverrideTrust) {
// Test that the certificate verification now succeeds, because the
// TestRootCerts is successfully imbuing trust.
CertVerifyResult good_verify_result;
- int good_status = verify_proc->Verify(test_cert,
+ int good_status = verify_proc->Verify(test_cert.get(),
"127.0.0.1",
flags,
NULL,
@@ -122,7 +122,7 @@ TEST(TestRootCertsTest, OverrideTrust) {
// revert to their original state, and don't linger. If trust status
// lingers, it will likely break other tests in net_unittests.
CertVerifyResult restored_verify_result;
- int restored_status = verify_proc->Verify(test_cert,
+ int restored_status = verify_proc->Verify(test_cert.get(),
"127.0.0.1",
flags,
NULL,
« no previous file with comments | « net/cert/nss_cert_database.cc ('k') | net/cert/x509_certificate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698