| 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 812d638628b560a1a5fd619ecaf0ed3dd4e766f5..55f99687a8a0b0f9331738a177c7574d89f3258b 100644
|
| --- a/chrome/browser/ui/app_list/app_list_service_unittest.cc
|
| +++ b/chrome/browser/ui/app_list/app_list_service_unittest.cc
|
| @@ -86,7 +86,6 @@ 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(
|
| @@ -100,7 +99,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_, initial_profile_);
|
| + profile_store_ = new FakeProfileStore(user_data_dir_, local_state_.get());
|
| service_.reset(new TestingAppListServiceImpl(
|
| command_line,
|
| local_state_.get(),
|
| @@ -113,7 +112,6 @@ 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_;
|
| @@ -142,8 +140,12 @@ TEST_F(AppListServiceUnitTest, ShowingForProfileLoadsAProfile) {
|
| TEST_F(AppListServiceUnitTest, RemovedProfileResetsToInitialProfile) {
|
| EnableAppList();
|
| profile_store_->RemoveProfile(profile1_.get());
|
| +
|
| + // kAppListProfile should have been cleared, and therefore GetProfilePath
|
| + // should return the initial profile.
|
| + EXPECT_EQ("", local_state_->GetString(prefs::kAppListProfile));
|
| base::FilePath initial_profile_path =
|
| - user_data_dir_.AppendASCII(initial_profile_);
|
| + user_data_dir_.AppendASCII(chrome::kInitialProfile);
|
| EXPECT_EQ(initial_profile_path,
|
| service_->GetProfilePath(profile_store_->GetUserDataDir()));
|
| }
|
| @@ -154,6 +156,8 @@ TEST_F(AppListServiceUnitTest,
|
| EnableAppList();
|
| profile_store_->RemoveProfile(profile1_.get());
|
|
|
| + // kAppListProfile should have been set to kProfileLastUsed.
|
| + EXPECT_EQ("last-used", local_state_->GetString(prefs::kAppListProfile));
|
| base::FilePath last_used_profile_path =
|
| user_data_dir_.AppendASCII("last-used");
|
| EXPECT_EQ(last_used_profile_path,
|
|
|