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

Side by Side Diff: net/cert/cert_verify_proc_unittest.cc

Issue 5535006: Add unittests for net::TestRootCerts and regenerate test certificates (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix another hardcoded string 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/cert/cert_verify_proc.h" 5 #include "net/cert/cert_verify_proc.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/files/file_path.h" 9 #include "base/files/file_path.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 802 matching lines...) Expand 10 before | Expand all | Expand 10 after
813 } 813 }
814 814
815 TEST_F(CertVerifyProcTest, AdditionalTrustAnchors) { 815 TEST_F(CertVerifyProcTest, AdditionalTrustAnchors) {
816 if (!SupportsAdditionalTrustAnchors()) { 816 if (!SupportsAdditionalTrustAnchors()) {
817 LOG(INFO) << "Skipping this test in this platform."; 817 LOG(INFO) << "Skipping this test in this platform.";
818 return; 818 return;
819 } 819 }
820 820
821 // |ca_cert| is the issuer of |cert|. 821 // |ca_cert| is the issuer of |cert|.
822 CertificateList ca_cert_list = CreateCertificateListFromFile( 822 CertificateList ca_cert_list = CreateCertificateListFromFile(
823 GetTestCertsDirectory(), "root_ca_cert.crt", 823 GetTestCertsDirectory(), "root_ca_cert.pem",
824 X509Certificate::FORMAT_AUTO); 824 X509Certificate::FORMAT_AUTO);
825 ASSERT_EQ(1U, ca_cert_list.size()); 825 ASSERT_EQ(1U, ca_cert_list.size());
826 scoped_refptr<X509Certificate> ca_cert(ca_cert_list[0]); 826 scoped_refptr<X509Certificate> ca_cert(ca_cert_list[0]);
827 827
828 CertificateList cert_list = CreateCertificateListFromFile( 828 CertificateList cert_list = CreateCertificateListFromFile(
829 GetTestCertsDirectory(), "ok_cert.pem", 829 GetTestCertsDirectory(), "ok_cert.pem",
830 X509Certificate::FORMAT_AUTO); 830 X509Certificate::FORMAT_AUTO);
831 ASSERT_EQ(1U, cert_list.size()); 831 ASSERT_EQ(1U, cert_list.size());
832 scoped_refptr<X509Certificate> cert(cert_list[0]); 832 scoped_refptr<X509Certificate> cert(cert_list[0]);
833 833
(...skipping 560 matching lines...) Expand 10 before | Expand all | Expand 10 after
1394 TEST_P(CertVerifyProcNonUniqueNameTest, IsHostnameNonUnique) { 1394 TEST_P(CertVerifyProcNonUniqueNameTest, IsHostnameNonUnique) {
1395 const NonUniqueNameTestData& test_data = GetParam(); 1395 const NonUniqueNameTestData& test_data = GetParam();
1396 1396
1397 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname)); 1397 EXPECT_EQ(test_data.is_unique, IsUnique(test_data.hostname));
1398 } 1398 }
1399 1399
1400 INSTANTIATE_TEST_CASE_P(, CertVerifyProcNonUniqueNameTest, 1400 INSTANTIATE_TEST_CASE_P(, CertVerifyProcNonUniqueNameTest,
1401 testing::ValuesIn(kNonUniqueNameTestData)); 1401 testing::ValuesIn(kNonUniqueNameTestData));
1402 1402
1403 } // namespace net 1403 } // namespace net
OLDNEW
« no previous file with comments | « net/android/javatests/src/org/chromium/net/X509UtilTest.java ('k') | net/cert/nss_cert_database_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698