Chromium Code Reviews| Index: net/sqlite/sqlite_server_bound_cert_store_unittest.cc |
| diff --git a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc b/net/sqlite/sqlite_server_bound_cert_store_unittest.cc |
| similarity index 97% |
| rename from chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc |
| rename to net/sqlite/sqlite_server_bound_cert_store_unittest.cc |
| index 5afb73de23efa529c79e524964b7ce6e5ed04773..4aa1af6bad8c0d90553d78de8a6e722163796a29 100644 |
| --- a/chrome/browser/net/sqlite_server_bound_cert_store_unittest.cc |
| +++ b/net/sqlite/sqlite_server_bound_cert_store_unittest.cc |
| @@ -10,16 +10,18 @@ |
| #include "base/message_loop/message_loop.h" |
| #include "base/run_loop.h" |
| #include "base/stl_util.h" |
| -#include "chrome/browser/net/sqlite_server_bound_cert_store.h" |
| -#include "chrome/common/chrome_constants.h" |
| -#include "content/public/test/mock_special_storage_policy.h" |
| -#include "content/public/test/test_browser_thread_bundle.h" |
| #include "net/base/test_data_directory.h" |
| +#include "net/sqlite/sqlite_server_bound_cert_store.h" |
| #include "net/ssl/ssl_client_cert_type.h" |
| #include "net/test/cert_test_util.h" |
| #include "sql/statement.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| +namespace net { |
| + |
| +const base::FilePath::CharType kTestOBCertFilename[] = |
| + FILE_PATH_LITERAL("Origin Bound Certs"); |
|
Ryan Sleevi
2014/07/10 20:20:25
pedantry: Doesn't need this constant, does it? You
mef
2014/07/11 13:29:24
Um, not sure I understand. SQLiteServerBoundCertSt
Ryan Sleevi
2014/07/14 19:18:04
Acknowledged.
|
| + |
| class SQLiteServerBoundCertStoreTest : public testing::Test { |
| public: |
| void Load( |
| @@ -76,7 +78,7 @@ class SQLiteServerBoundCertStoreTest : public testing::Test { |
| virtual void SetUp() { |
| ASSERT_TRUE(temp_dir_.CreateUniqueTempDir()); |
| store_ = new SQLiteServerBoundCertStore( |
| - temp_dir_.path().Append(chrome::kOBCertFilename), |
| + temp_dir_.path().Append(kTestOBCertFilename), |
| base::MessageLoopProxy::current(), |
| NULL); |
| ScopedVector<net::DefaultServerBoundCertStore::ServerBoundCert> certs; |
| @@ -91,7 +93,6 @@ class SQLiteServerBoundCertStoreTest : public testing::Test { |
| "a", "b")); |
| } |
| - content::TestBrowserThreadBundle thread_bundle_; |
| base::ScopedTempDir temp_dir_; |
| scoped_refptr<SQLiteServerBoundCertStore> store_; |
| ScopedVector<net::DefaultServerBoundCertStore::ServerBoundCert> certs_; |
| @@ -114,7 +115,7 @@ TEST_F(SQLiteServerBoundCertStoreTest, TestPersistence) { |
| // Make sure we wait until the destructor has run. |
| base::RunLoop().RunUntilIdle(); |
| store_ = new SQLiteServerBoundCertStore( |
| - temp_dir_.path().Append(chrome::kOBCertFilename), |
| + temp_dir_.path().Append(kTestOBCertFilename), |
| base::MessageLoopProxy::current(), |
| NULL); |
| @@ -149,7 +150,7 @@ TEST_F(SQLiteServerBoundCertStoreTest, TestPersistence) { |
| base::RunLoop().RunUntilIdle(); |
| certs.clear(); |
| store_ = new SQLiteServerBoundCertStore( |
| - temp_dir_.path().Append(chrome::kOBCertFilename), |
| + temp_dir_.path().Append(kTestOBCertFilename), |
| base::MessageLoopProxy::current(), |
| NULL); |
| @@ -471,3 +472,5 @@ TEST_F(SQLiteServerBoundCertStoreTest, TestRSADiscarded) { |
| // Make sure we wait until the destructor has run. |
| base::RunLoop().RunUntilIdle(); |
| } |
| + |
| +} // namespace net |