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

Side by Side Diff: chromeos/cert_loader_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
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chromeos/network/auto_connect_handler_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromeos/cert_loader.h" 5 #include "chromeos/cert_loader.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <memory> 9 #include <memory>
10 #include <utility> 10 #include <utility>
11 11
12 #include "base/bind.h" 12 #include "base/bind.h"
13 #include "base/files/file_util.h" 13 #include "base/files/file_util.h"
14 #include "base/message_loop/message_loop.h" 14 #include "base/message_loop/message_loop.h"
15 #include "base/run_loop.h" 15 #include "base/run_loop.h"
16 #include "crypto/scoped_nss_types.h" 16 #include "crypto/scoped_nss_types.h"
17 #include "crypto/scoped_test_nss_db.h" 17 #include "crypto/scoped_test_nss_db.h"
18 #include "net/base/test_data_directory.h"
19 #include "net/cert/nss_cert_database_chromeos.h" 18 #include "net/cert/nss_cert_database_chromeos.h"
20 #include "net/cert/x509_certificate.h" 19 #include "net/cert/x509_certificate.h"
21 #include "net/test/cert_test_util.h" 20 #include "net/test/cert_test_util.h"
21 #include "net/test/test_data_directory.h"
22 #include "testing/gtest/include/gtest/gtest.h" 22 #include "testing/gtest/include/gtest/gtest.h"
23 23
24 namespace chromeos { 24 namespace chromeos {
25 namespace { 25 namespace {
26 26
27 bool IsCertInCertificateList(const net::X509Certificate* cert, 27 bool IsCertInCertificateList(const net::X509Certificate* cert,
28 const net::CertificateList& cert_list) { 28 const net::CertificateList& cert_list) {
29 for (net::CertificateList::const_iterator it = cert_list.begin(); 29 for (net::CertificateList::const_iterator it = cert_list.begin();
30 it != cert_list.end(); 30 it != cert_list.end();
31 ++it) { 31 ++it) {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ASSERT_TRUE(primary_certdb_->SetCertTrust(certs[0].get(), net::CA_CERT, 277 ASSERT_TRUE(primary_certdb_->SetCertTrust(certs[0].get(), net::CA_CERT,
278 net::NSSCertDatabase::TRUSTED_SSL)); 278 net::NSSCertDatabase::TRUSTED_SSL));
279 279
280 // Cert trust change should trigger certificate reload in cert_loader_. 280 // Cert trust change should trigger certificate reload in cert_loader_.
281 ASSERT_EQ(0U, GetAndResetCertificatesLoadedEventsCount()); 281 ASSERT_EQ(0U, GetAndResetCertificatesLoadedEventsCount());
282 base::RunLoop().RunUntilIdle(); 282 base::RunLoop().RunUntilIdle();
283 EXPECT_EQ(1U, GetAndResetCertificatesLoadedEventsCount()); 283 EXPECT_EQ(1U, GetAndResetCertificatesLoadedEventsCount());
284 } 284 }
285 285
286 } // namespace chromeos 286 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/test/ppapi/ppapi_test.cc ('k') | chromeos/network/auto_connect_handler_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698