| Index: net/cert/nss_cert_database_chromeos_unittest.cc
|
| diff --git a/net/cert/nss_cert_database_chromeos_unittest.cc b/net/cert/nss_cert_database_chromeos_unittest.cc
|
| index 9cd226411e2939163de34f3c37cbdc004a0e2853..11710419460cce294a6b70031052b2628a3f4aa1 100644
|
| --- a/net/cert/nss_cert_database_chromeos_unittest.cc
|
| +++ b/net/cert/nss_cert_database_chromeos_unittest.cc
|
| @@ -8,7 +8,9 @@
|
|
|
| #include "base/bind.h"
|
| #include "base/callback.h"
|
| +#include "base/message_loop/message_loop.h"
|
| #include "base/run_loop.h"
|
| +#include "base/test/scoped_task_scheduler.h"
|
| #include "base/threading/thread_task_runner_handle.h"
|
| #include "crypto/nss_util_internal.h"
|
| #include "crypto/scoped_test_nss_chromeos_user.h"
|
| @@ -48,7 +50,10 @@ class NSSCertDatabaseChromeOSTest : public testing::Test,
|
| public CertDatabase::Observer {
|
| public:
|
| NSSCertDatabaseChromeOSTest()
|
| - : observer_added_(false), user_1_("user1"), user_2_("user2") {}
|
| + : scoped_task_scheduler_(base::MessageLoop::current()),
|
| + observer_added_(false),
|
| + user_1_("user1"),
|
| + user_2_("user2") {}
|
|
|
| void SetUp() override {
|
| // Initialize nss_util slots.
|
| @@ -63,7 +68,6 @@ class NSSCertDatabaseChromeOSTest : public testing::Test,
|
| crypto::GetPrivateSlotForChromeOSUser(
|
| user_1_.username_hash(),
|
| base::Callback<void(crypto::ScopedPK11Slot)>())));
|
| - db_1_->SetSlowTaskRunnerForTest(base::ThreadTaskRunnerHandle::Get());
|
| db_1_->SetSystemSlot(
|
| crypto::ScopedPK11Slot(PK11_ReferenceSlot(system_db_.slot())));
|
| db_2_.reset(new NSSCertDatabaseChromeOS(
|
| @@ -71,7 +75,6 @@ class NSSCertDatabaseChromeOSTest : public testing::Test,
|
| crypto::GetPrivateSlotForChromeOSUser(
|
| user_2_.username_hash(),
|
| base::Callback<void(crypto::ScopedPK11Slot)>())));
|
| - db_2_->SetSlowTaskRunnerForTest(base::ThreadTaskRunnerHandle::Get());
|
|
|
| // Add observer to CertDatabase for checking that notifications from
|
| // NSSCertDatabaseChromeOS are proxied to the CertDatabase.
|
| @@ -90,6 +93,8 @@ class NSSCertDatabaseChromeOSTest : public testing::Test,
|
| }
|
|
|
| protected:
|
| + base::test::ScopedTaskScheduler scoped_task_scheduler_;
|
| +
|
| bool observer_added_;
|
| // Certificates that were passed to the CertDatabase observers.
|
| std::vector<CERTCertificate*> added_ca_;
|
|
|