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

Unified Diff: chromeos/cert_loader_unittest.cc

Issue 2603173002: Use TaskScheduler instead of WorkerPool in nss_cert_database.cc. (Closed)
Patch Set: Created 3 years, 12 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 side-by-side diff with in-line comments
Download patch
Index: chromeos/cert_loader_unittest.cc
diff --git a/chromeos/cert_loader_unittest.cc b/chromeos/cert_loader_unittest.cc
index 9cf8525855b08c69c9bdf4bcd3d71ac475e6187b..d2ccb40d717c86f6ae954f5ff22aab27fb6a40eb 100644
--- a/chromeos/cert_loader_unittest.cc
+++ b/chromeos/cert_loader_unittest.cc
@@ -11,8 +11,8 @@
#include "base/bind.h"
#include "base/files/file_util.h"
-#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
+#include "base/test/scoped_task_scheduler.h"
#include "crypto/scoped_nss_types.h"
#include "crypto/scoped_test_nss_db.h"
#include "net/cert/nss_cert_database_chromeos.h"
@@ -103,7 +103,6 @@ class CertLoaderTest : public testing::Test,
certdb->reset(new TestNSSCertDatabase(
crypto::ScopedPK11Slot(PK11_ReferenceSlot(db->slot())),
crypto::ScopedPK11Slot(PK11_ReferenceSlot(db->slot()))));
- (*certdb)->SetSlowTaskRunnerForTest(message_loop_.task_runner());
}
void ImportCACert(const std::string& cert_file,
@@ -144,7 +143,7 @@ class CertLoaderTest : public testing::Test,
crypto::ScopedTestNSSDB primary_db_;
std::unique_ptr<TestNSSCertDatabase> primary_certdb_;
- base::MessageLoop message_loop_;
+ base::test::ScopedTaskScheduler scoped_task_scheduler_;
Ryan Sleevi 2017/01/27 00:51:58 Why don't you need to bind this to a message loop,
fdoray 2017/02/02 17:56:32 I improved the ScopedTaskScheduler documentation.
private:
size_t certificates_loaded_events_count_;

Powered by Google App Engine
This is Rietveld 408576698