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

Unified Diff: components/history/core/browser/typed_url_syncable_service_unittest.cc

Issue 1475823002: [Sync] TypedUrlSyncableServiceTest tests leave junk in TEMP directory (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/history/core/browser/typed_url_syncable_service_unittest.cc
diff --git a/components/history/core/browser/typed_url_syncable_service_unittest.cc b/components/history/core/browser/typed_url_syncable_service_unittest.cc
index 977506d56920bdd5ff6a3841f095ed0d9949bfd9..fdd7fcea4dd6483c91133e565602687e0dda03bb 100644
--- a/components/history/core/browser/typed_url_syncable_service_unittest.cc
+++ b/components/history/core/browser/typed_url_syncable_service_unittest.cc
@@ -5,6 +5,7 @@
#include "components/history/core/browser/typed_url_syncable_service.h"
#include "base/files/file_util.h"
+#include "base/files/scoped_temp_dir.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "base/memory/scoped_ptr.h"
@@ -214,10 +215,10 @@ class TypedUrlSyncableServiceTest : public testing::Test {
void SetUp() override {
fake_history_backend_ = new TestHistoryBackend();
- ASSERT_TRUE(base::CreateNewTempDirectory(
- FILE_PATH_LITERAL("TypedUrlSyncableServiceTest"), &test_dir_));
- fake_history_backend_->Init(std::string(), false,
- TestHistoryDatabaseParamsForPath(test_dir_));
+ ASSERT_TRUE(test_dir_.CreateUniqueTempDir());
+ fake_history_backend_->Init(
+ std::string(), false,
+ TestHistoryDatabaseParamsForPath(test_dir_.path()));
typed_url_sync_service_.reset(
new TypedUrlSyncableService(fake_history_backend_.get()));
fake_change_processor_.reset(new syncer::FakeSyncChangeProcessor);
@@ -285,7 +286,7 @@ class TypedUrlSyncableServiceTest : public testing::Test {
protected:
base::MessageLoop message_loop_;
- base::FilePath test_dir_;
+ base::ScopedTempDir test_dir_;
scoped_refptr<TestHistoryBackend> fake_history_backend_;
scoped_ptr<TypedUrlSyncableService> typed_url_sync_service_;
scoped_ptr<syncer::FakeSyncChangeProcessor> fake_change_processor_;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698