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

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

Issue 2090463002: Move net/base/test_data_directory.[cc,h] to net/test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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/nss_cert_database.h" 5 #include "net/cert/nss_cert_database.h"
6 6
7 #include <cert.h> 7 #include <cert.h>
8 #include <certdb.h> 8 #include <certdb.h>
9 #include <pk11pub.h> 9 #include <pk11pub.h>
10 10
11 #include <algorithm> 11 #include <algorithm>
12 #include <memory> 12 #include <memory>
13 13
14 #include "base/bind.h" 14 #include "base/bind.h"
15 #include "base/files/file_path.h" 15 #include "base/files/file_path.h"
16 #include "base/files/file_util.h" 16 #include "base/files/file_util.h"
17 #include "base/lazy_instance.h" 17 #include "base/lazy_instance.h"
18 #include "base/run_loop.h" 18 #include "base/run_loop.h"
19 #include "base/strings/string16.h" 19 #include "base/strings/string16.h"
20 #include "base/strings/string_util.h" 20 #include "base/strings/string_util.h"
21 #include "base/strings/utf_string_conversions.h" 21 #include "base/strings/utf_string_conversions.h"
22 #include "base/threading/thread_task_runner_handle.h" 22 #include "base/threading/thread_task_runner_handle.h"
23 #include "crypto/scoped_nss_types.h" 23 #include "crypto/scoped_nss_types.h"
24 #include "crypto/scoped_test_nss_db.h" 24 #include "crypto/scoped_test_nss_db.h"
25 #include "net/base/crypto_module.h" 25 #include "net/base/crypto_module.h"
26 #include "net/base/hash_value.h" 26 #include "net/base/hash_value.h"
27 #include "net/base/net_errors.h" 27 #include "net/base/net_errors.h"
28 #include "net/base/test_data_directory.h"
29 #include "net/cert/cert_status_flags.h" 28 #include "net/cert/cert_status_flags.h"
30 #include "net/cert/cert_verify_proc_nss.h" 29 #include "net/cert/cert_verify_proc_nss.h"
31 #include "net/cert/cert_verify_result.h" 30 #include "net/cert/cert_verify_result.h"
32 #include "net/cert/x509_certificate.h" 31 #include "net/cert/x509_certificate.h"
33 #include "net/test/cert_test_util.h" 32 #include "net/test/cert_test_util.h"
33 #include "net/test/test_data_directory.h"
34 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h" 34 #include "net/third_party/mozilla_security_manager/nsNSSCertificateDB.h"
35 #include "testing/gtest/include/gtest/gtest.h" 35 #include "testing/gtest/include/gtest/gtest.h"
36 36
37 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use 37 // In NSS 3.13, CERTDB_VALID_PEER was renamed CERTDB_TERMINAL_RECORD. So we use
38 // the new name of the macro. 38 // the new name of the macro.
39 #if !defined(CERTDB_TERMINAL_RECORD) 39 #if !defined(CERTDB_TERMINAL_RECORD)
40 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER 40 #define CERTDB_TERMINAL_RECORD CERTDB_VALID_PEER
41 #endif 41 #endif
42 42
43 using base::ASCIIToUTF16; 43 using base::ASCIIToUTF16;
(...skipping 937 matching lines...) Expand 10 before | Expand all | Expand 10 after
981 EXPECT_EQ(NSSCertDatabase::TRUST_DEFAULT, 981 EXPECT_EQ(NSSCertDatabase::TRUST_DEFAULT,
982 cert_db_->GetCertTrust(certs2[0].get(), SERVER_CERT)); 982 cert_db_->GetCertTrust(certs2[0].get(), SERVER_CERT));
983 983
984 new_certs = ListCerts(); 984 new_certs = ListCerts();
985 ASSERT_EQ(2U, new_certs.size()); 985 ASSERT_EQ(2U, new_certs.size());
986 EXPECT_STRNE(new_certs[0]->os_cert_handle()->nickname, 986 EXPECT_STRNE(new_certs[0]->os_cert_handle()->nickname,
987 new_certs[1]->os_cert_handle()->nickname); 987 new_certs[1]->os_cert_handle()->nickname);
988 } 988 }
989 989
990 } // namespace net 990 } // namespace net
OLDNEW
« no previous file with comments | « net/cert/nss_cert_database_chromeos_unittest.cc ('k') | net/cert/nss_profile_filter_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698