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

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

Issue 15255004: Refactor of BrowserDistribution. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rework 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
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..804dfb7b69758215b2212dd8d23311c35d4a613e 100644
--- a/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
+++ b/chrome/browser/profiles/profile_shortcut_manager_unittest_win.cc
@@ -223,7 +223,9 @@ class ProfileShortcutManagerTest : public testing::Test {
ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS)) << location.ToString();
const base::FilePath system_level_shortcut_path =
GetSystemShortcutsDirectory().Append(
- distribution->GetAppShortCutName() + installer::kLnkExt);
+ distribution->
+ GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME).name
+ + installer::kLnkExt);
gab 2013/05/24 15:01:35 '+' on previous line and indent 4 spaces in
calamity 2013/05/31 00:11:18 Done.
EXPECT_TRUE(file_util::PathExists(system_level_shortcut_path))
<< location.ToString();
return system_level_shortcut_path;
@@ -311,7 +313,8 @@ TEST_F(ProfileShortcutManagerTest, ShortcutFilenameStripsReservedCharacters) {
const string16 kSanitizedProfileName = L"Harry";
BrowserDistribution* distribution = GetDistribution();
const string16 expected_name = kSanitizedProfileName + L" - " +
- distribution->GetAppShortCutName() + installer::kLnkExt;
+ distribution->GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME).name
+ + installer::kLnkExt;
gab 2013/05/24 15:01:35 '+' on previous line +indent 4 spaces in.
calamity 2013/05/31 00:11:18 Done.
EXPECT_EQ(expected_name,
profiles::internal::GetShortcutFilenameForProfile(kProfileName,
distribution));
@@ -319,9 +322,11 @@ TEST_F(ProfileShortcutManagerTest, ShortcutFilenameStripsReservedCharacters) {
TEST_F(ProfileShortcutManagerTest, UnbadgedShortcutFilename) {
BrowserDistribution* distribution = GetDistribution();
- EXPECT_EQ(distribution->GetAppShortCutName() + installer::kLnkExt,
- profiles::internal::GetShortcutFilenameForProfile(string16(),
- distribution));
+ EXPECT_EQ(
+ distribution->GetShortcutInfo(BrowserDistribution::SHORTCUT_CHROME).name
+ + installer::kLnkExt,
gab 2013/05/24 15:01:35 nit: '+' on previous line
calamity 2013/05/31 00:11:18 Done.
+ profiles::internal::GetShortcutFilenameForProfile(string16(),
+ distribution));
}
TEST_F(ProfileShortcutManagerTest, ShortcutFlags) {
@@ -579,7 +584,8 @@ TEST_F(ProfileShortcutManagerTest, UpdateShortcutWithNoFlags) {
false));
const base::FilePath regular_shortcut_path =
CreateRegularShortcutWithName(FROM_HERE,
- GetDistribution()->GetAppShortCutName());
+ GetDistribution()->GetShortcutInfo(
+ BrowserDistribution::SHORTCUT_CHROME).name);
// Add another profile and check that the shortcut was replaced with
// a badged shortcut with the right command line for the profile
@@ -597,7 +603,8 @@ TEST_F(ProfileShortcutManagerTest, UpdateTwoShortcutsWithNoFlags) {
false));
const base::FilePath regular_shortcut_path =
CreateRegularShortcutWithName(FROM_HERE,
- GetDistribution()->GetAppShortCutName());
+ GetDistribution()->GetShortcutInfo(
+ BrowserDistribution::SHORTCUT_CHROME).name);
const base::FilePath customized_regular_shortcut_path =
CreateRegularShortcutWithName(FROM_HERE, L"MyChrome");
« no previous file with comments | « no previous file | chrome/browser/profiles/profile_shortcut_manager_win.cc » ('j') | chrome/installer/setup/install_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698