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

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

Issue 508813002: Move ownership of the AppListViewDelegate into the AppListService (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix comments Created 6 years, 3 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 2ee7cb260b8bb80c1cfeeda31861067d29f84b10..f6d80a61aa8768f0097039187089c0892e4a1465 100644
--- a/chrome/browser/ui/app_list/app_list_service_unittest.cc
+++ b/chrome/browser/ui/app_list/app_list_service_unittest.cc
@@ -157,7 +157,6 @@ TEST_F(AppListServiceUnitTest,
RemovedProfileResetsToLastUsedProfileIfExists) {
local_state_->SetString(prefs::kProfileLastUsed, "last-used");
EnableAppList();
- EXPECT_EQ(0, service_->destroy_app_list_call_count());
profile_store_->RemoveProfile(profile1_.get());
base::FilePath last_used_profile_path =
@@ -165,10 +164,9 @@ TEST_F(AppListServiceUnitTest,
EXPECT_EQ(last_used_profile_path,
service_->GetProfilePath(profile_store_->GetUserDataDir()));
- // Ensure a tear-down was triggered, since there would be references to the
- // destroyed Profile, and the last-used profile could be getting loaded
- // asynchronously.
- EXPECT_EQ(1, service_->destroy_app_list_call_count());
+ // For this test, the AppListViewDelegate is not created because the
+ // app list is never shown, so there is nothing to destroy.
+ EXPECT_EQ(0, service_->destroy_app_list_call_count());
}
TEST_F(AppListServiceUnitTest, SwitchingProfilesPersists) {
« no previous file with comments | « chrome/browser/ui/app_list/app_list_service_mac.mm ('k') | chrome/browser/ui/app_list/app_list_service_views.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698