| OLD | NEW |
| 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> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/files/file_util.h" | 10 #include "base/files/file_util.h" |
| 9 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 10 #include "base/message_loop/message_loop.h" | 12 #include "base/message_loop/message_loop.h" |
| 11 #include "base/run_loop.h" | 13 #include "base/run_loop.h" |
| 12 #include "crypto/scoped_nss_types.h" | 14 #include "crypto/scoped_nss_types.h" |
| 13 #include "crypto/scoped_test_nss_db.h" | 15 #include "crypto/scoped_test_nss_db.h" |
| 14 #include "net/base/test_data_directory.h" | 16 #include "net/base/test_data_directory.h" |
| 15 #include "net/cert/nss_cert_database_chromeos.h" | 17 #include "net/cert/nss_cert_database_chromeos.h" |
| 16 #include "net/cert/x509_certificate.h" | 18 #include "net/cert/x509_certificate.h" |
| (...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 ASSERT_TRUE(primary_certdb_->SetCertTrust(certs[0].get(), net::CA_CERT, | 274 ASSERT_TRUE(primary_certdb_->SetCertTrust(certs[0].get(), net::CA_CERT, |
| 273 net::NSSCertDatabase::TRUSTED_SSL)); | 275 net::NSSCertDatabase::TRUSTED_SSL)); |
| 274 | 276 |
| 275 // Cert trust change should trigger certificate reload in cert_loader_. | 277 // Cert trust change should trigger certificate reload in cert_loader_. |
| 276 ASSERT_EQ(0U, GetAndResetCertificatesLoadedEventsCount()); | 278 ASSERT_EQ(0U, GetAndResetCertificatesLoadedEventsCount()); |
| 277 base::RunLoop().RunUntilIdle(); | 279 base::RunLoop().RunUntilIdle(); |
| 278 EXPECT_EQ(1U, GetAndResetCertificatesLoadedEventsCount()); | 280 EXPECT_EQ(1U, GetAndResetCertificatesLoadedEventsCount()); |
| 279 } | 281 } |
| 280 | 282 |
| 281 } // namespace chromeos | 283 } // namespace chromeos |
| OLD | NEW |