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

Unified Diff: chrome/browser/ui/app_list/app_list_service_unittest.cc

Issue 1113333003: Don't create a new profile when cleaning up stale ephemeral profiles. (Closed) Base URL: https://chromium.googlesource.com/chromium/src@master
Patch Set: fix Created 5 years, 7 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: chrome/browser/ui/app_list/app_list_service_unittest.cc
diff --git a/chrome/browser/ui/app_list/app_list_service_unittest.cc b/chrome/browser/ui/app_list/app_list_service_unittest.cc
index 7b342d0dfe9dacad83924fd4b1549ebc615dab31..812d638628b560a1a5fd619ecaf0ed3dd4e766f5 100644
--- a/chrome/browser/ui/app_list/app_list_service_unittest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_unittest.cc
@@ -86,6 +86,7 @@ class AppListServiceUnitTest : public testing::Test {
protected:
void SetupWithCommandLine(const base::CommandLine& command_line) {
user_data_dir_ = base::FilePath(FILE_PATH_LITERAL("udd"));
+ initial_profile_ = "ip";
profile1_.reset(
new FakeProfile("p1", user_data_dir_.AppendASCII("profile1")));
profile2_.reset(
@@ -99,7 +100,7 @@ class AppListServiceUnitTest : public testing::Test {
factory.set_user_prefs(make_scoped_refptr(new TestingPrefStore));
local_state_ = factory.Create(pref_registry).Pass();
- profile_store_ = new FakeProfileStore(user_data_dir_);
+ profile_store_ = new FakeProfileStore(user_data_dir_, initial_profile_);
service_.reset(new TestingAppListServiceImpl(
command_line,
local_state_.get(),
@@ -112,6 +113,7 @@ class AppListServiceUnitTest : public testing::Test {
}
base::FilePath user_data_dir_;
+ std::string initial_profile_;
scoped_ptr<PrefService> local_state_;
FakeProfileStore* profile_store_;
scoped_ptr<TestingAppListServiceImpl> service_;
@@ -141,7 +143,7 @@ TEST_F(AppListServiceUnitTest, RemovedProfileResetsToInitialProfile) {
EnableAppList();
profile_store_->RemoveProfile(profile1_.get());
base::FilePath initial_profile_path =
- user_data_dir_.AppendASCII(chrome::kInitialProfile);
+ user_data_dir_.AppendASCII(initial_profile_);
EXPECT_EQ(initial_profile_path,
service_->GetProfilePath(profile_store_->GetUserDataDir()));
}
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_impl.cc ('k') | chrome/browser/ui/app_list/profile_loader_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698