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

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

Issue 14137032: Create profile .ico file on profile creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add profile icon creation on first run past this change Created 7 years, 8 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/profiles/profile_shortcut_manager_unittest_win.cc
diff --git a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
index 9fec5b7426c2fb446fea1209da8b5323ff894fcc..68660281863985a6e8e24c063948b038d69fb7fc 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -72,8 +72,10 @@ class ProfileShortcutManagerTest : public testing::Test {
RunPendingTasks();
ASSERT_FALSE(ProfileShortcutExistsAtDefaultPath(profile_name));
const base::FilePath icon_path =
- profile_path.AppendASCII(profiles::internal::kProfileIconFileName);
- ASSERT_FALSE(file_util::PathExists(icon_path));
+ profiles::internal::GetProfileIconPath(profile_path);
+ // The icon file should not be deleted on shortcut deletion.
+ ASSERT_TRUE(file_util::PathExists(icon_path));
+ ASSERT_TRUE(file_util::Delete(icon_path, false));
gab 2013/05/07 12:38:39 Use base::win::TaskbarUnpinShortcutLink(icon_path.
calamity 2013/05/08 08:15:42 I don't think this unit test pins shortcuts? Also
gab 2013/05/08 13:01:08 Oh whoops, my bad :)!
}
}
@@ -137,7 +139,7 @@ class ProfileShortcutManagerTest : public testing::Test {
// Ensure that the corresponding icon exists.
const base::FilePath icon_path =
- profile_path.AppendASCII(profiles::internal::kProfileIconFileName);
+ profiles::internal::GetProfileIconPath(profile_path);
EXPECT_TRUE(file_util::PathExists(icon_path)) << location.ToString();
base::win::ShortcutProperties expected_properties;
@@ -761,7 +763,7 @@ TEST_F(ProfileShortcutManagerTest,
CreateRegularSystemLevelShortcut(FROM_HERE);
// Delete the profile that has a shortcut, which will exercise the non-profile
- // shortcut creation path in |DeleteDesktopShortcutsAndIconFile()|, which is
+ // shortcut creation path in |DeleteDesktopShortcuts()|, which is
// not covered by the |DeleteSecondToLastProfileWithSystemLevelShortcut| test.
profile_info_cache_->DeleteProfileFromCache(profile_2_path_);
RunPendingTasks();

Powered by Google App Engine
This is Rietveld 408576698