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

Unified Diff: chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc

Issue 15986006: Don't create an unbadged shortcut when first profile is created. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 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
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_shortcut_manager_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
===================================================================
--- chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (revision 202083)
+++ chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc (working copy)
@@ -91,26 +91,22 @@
}
void SetupDefaultProfileShortcut(const tracked_objects::Location& location) {
+ ASSERT_EQ(0, profile_info_cache_->GetNumberOfProfiles())
+ << location.ToString();
ASSERT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_1_name_))
<< location.ToString();
- // A non-badged shortcut for chrome is automatically created with the
- // first profile (for the case when the user deletes their only profile).
profile_info_cache_->AddProfileToCache(profile_1_path_, profile_1_name_,
string16(), 0, false);
+ // Also create a non-badged shortcut for Chrome, which is conveniently done
+ // by |CreateProfileShortcut()| since there is only one profile.
+ profile_shortcut_manager_->CreateProfileShortcut(profile_1_path_);
RunPendingTasks();
- // We now have 1 profile, so we expect a new shortcut with no profile
- // information.
+ // Verify that there's now a shortcut with no profile information.
ValidateNonProfileShortcut(location);
}
void SetupAndCreateTwoShortcuts(const tracked_objects::Location& location) {
- ASSERT_EQ(0, profile_info_cache_->GetNumberOfProfiles())
- << location.ToString();
- ASSERT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_1_name_))
- << location.ToString();
-
- profile_info_cache_->AddProfileToCache(profile_1_path_, profile_1_name_,
- string16(), 0, false);
+ SetupDefaultProfileShortcut(location);
CreateProfileWithShortcut(location, profile_2_name_, profile_2_path_);
ValidateProfileShortcut(location, profile_1_name_, profile_1_path_);
}
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_shortcut_manager_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698