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

Unified Diff: net/extras/sqlite/sqlite_channel_id_store_unittest.cc

Issue 1841863002: Update monet. (Closed) Base URL: https://github.com/domokit/monet.git@master
Patch Set: Created 4 years, 9 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
« no previous file with comments | « net/dns/serial_worker.cc ('k') | net/filter/filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/extras/sqlite/sqlite_channel_id_store_unittest.cc
diff --git a/net/extras/sqlite/sqlite_channel_id_store_unittest.cc b/net/extras/sqlite/sqlite_channel_id_store_unittest.cc
index 17024f485cbc317500ae23e92a68de9351f80f37..0aee1c38ddcd00b483910c463a87a4d2e56aa276 100644
--- a/net/extras/sqlite/sqlite_channel_id_store_unittest.cc
+++ b/net/extras/sqlite/sqlite_channel_id_store_unittest.cc
@@ -10,6 +10,7 @@
#include "base/message_loop/message_loop.h"
#include "base/run_loop.h"
#include "base/stl_util.h"
+#include "base/thread_task_runner_handle.h"
#include "net/base/test_data_directory.h"
#include "net/extras/sqlite/sqlite_channel_id_store.h"
#include "net/ssl/ssl_client_cert_type.h"
@@ -77,7 +78,7 @@ class SQLiteChannelIDStoreTest : public testing::Test {
ASSERT_TRUE(temp_dir_.CreateUniqueTempDir());
store_ = new SQLiteChannelIDStore(
temp_dir_.path().Append(kTestChannelIDFilename),
- base::MessageLoopProxy::current());
+ base::ThreadTaskRunnerHandle::Get());
ScopedVector<DefaultChannelIDStore::ChannelID> channel_ids;
Load(&channel_ids);
ASSERT_EQ(0u, channel_ids.size());
@@ -113,7 +114,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestPersistence) {
base::RunLoop().RunUntilIdle();
store_ =
new SQLiteChannelIDStore(temp_dir_.path().Append(kTestChannelIDFilename),
- base::MessageLoopProxy::current());
+ base::ThreadTaskRunnerHandle::Get());
// Reload and test for persistence
Load(&channel_ids);
@@ -147,7 +148,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestPersistence) {
channel_ids.clear();
store_ =
new SQLiteChannelIDStore(temp_dir_.path().Append(kTestChannelIDFilename),
- base::MessageLoopProxy::current());
+ base::ThreadTaskRunnerHandle::Get());
// Reload and check if the cert has been removed.
Load(&channel_ids);
@@ -176,7 +177,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestDeleteAll) {
base::RunLoop().RunUntilIdle();
store_ =
new SQLiteChannelIDStore(temp_dir_.path().Append(kTestChannelIDFilename),
- base::MessageLoopProxy::current());
+ base::ThreadTaskRunnerHandle::Get());
// Reload and test for persistence
Load(&channel_ids);
@@ -194,7 +195,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestDeleteAll) {
channel_ids.clear();
store_ =
new SQLiteChannelIDStore(temp_dir_.path().Append(kTestChannelIDFilename),
- base::MessageLoopProxy::current());
+ base::ThreadTaskRunnerHandle::Get());
// Reload and check that only foo.com persisted in store.
Load(&channel_ids);
@@ -249,8 +250,8 @@ TEST_F(SQLiteChannelIDStoreTest, TestUpgradeV1) {
SCOPED_TRACE(i);
ScopedVector<DefaultChannelIDStore::ChannelID> channel_ids;
- store_ =
- new SQLiteChannelIDStore(v1_db_path, base::MessageLoopProxy::current());
+ store_ = new SQLiteChannelIDStore(v1_db_path,
+ base::ThreadTaskRunnerHandle::Get());
// Load the database. Because the existing v1 certs are implicitly of type
// RSA, which is unsupported, they're discarded.
@@ -319,8 +320,8 @@ TEST_F(SQLiteChannelIDStoreTest, TestUpgradeV2) {
SCOPED_TRACE(i);
ScopedVector<DefaultChannelIDStore::ChannelID> channel_ids;
- store_ =
- new SQLiteChannelIDStore(v2_db_path, base::MessageLoopProxy::current());
+ store_ = new SQLiteChannelIDStore(v2_db_path,
+ base::ThreadTaskRunnerHandle::Get());
// Load the database and ensure the certs can be read.
Load(&channel_ids);
@@ -402,8 +403,8 @@ TEST_F(SQLiteChannelIDStoreTest, TestUpgradeV3) {
SCOPED_TRACE(i);
ScopedVector<DefaultChannelIDStore::ChannelID> channel_ids;
- store_ =
- new SQLiteChannelIDStore(v3_db_path, base::MessageLoopProxy::current());
+ store_ = new SQLiteChannelIDStore(v3_db_path,
+ base::ThreadTaskRunnerHandle::Get());
// Load the database and ensure the certs can be read.
Load(&channel_ids);
@@ -494,7 +495,7 @@ TEST_F(SQLiteChannelIDStoreTest, TestRSADiscarded) {
ScopedVector<DefaultChannelIDStore::ChannelID> channel_ids;
store_ =
- new SQLiteChannelIDStore(v4_db_path, base::MessageLoopProxy::current());
+ new SQLiteChannelIDStore(v4_db_path, base::ThreadTaskRunnerHandle::Get());
// Load the database and ensure the certs can be read.
Load(&channel_ids);
« no previous file with comments | « net/dns/serial_worker.cc ('k') | net/filter/filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698