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

Unified Diff: chrome/installer/util/shell_util_unittest.cc

Issue 13864015: Move app launcher and chrome apps shortcut strings into the installer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@migrate_app_id_fix
Patch Set: rebase, move app launcher and chrome app strings into the installer 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
« chrome/installer/util/shell_util.cc ('K') | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/shell_util_unittest.cc
diff --git a/chrome/installer/util/shell_util_unittest.cc b/chrome/installer/util/shell_util_unittest.cc
index aa3d8e9f11d0dc70e7f93436958f1ec507c45054..3c8753f1ea3eb0a060fdfd666e9d51d3507db197 100644
--- a/chrome/installer/util/shell_util_unittest.cc
+++ b/chrome/installer/util/shell_util_unittest.cc
@@ -96,7 +96,7 @@ class ShellUtilShortcutTest : public testing::Test {
fake_user_quick_launch_.path() :
fake_default_user_quick_launch_.path();
break;
- case ShellUtil::SHORTCUT_LOCATION_START_MENU:
+ case ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR:
expected_path = (properties.level == ShellUtil::CURRENT_USER) ?
fake_start_menu_.path() : fake_common_start_menu_.path();
expected_path = expected_path.Append(dist_->GetAppShortCutName());
@@ -189,11 +189,11 @@ TEST_F(ShellUtilShortcutTest, GetShortcutPath) {
ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_QUICK_LAUNCH, dist_,
ShellUtil::SYSTEM_LEVEL, &path);
EXPECT_EQ(fake_default_user_quick_launch_.path(), path);
- ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
- ShellUtil::CURRENT_USER, &path);
+ ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, ShellUtil::CURRENT_USER, &path);
EXPECT_EQ(fake_start_menu_.path().Append(dist_->GetAppShortCutName()), path);
- ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
- ShellUtil::SYSTEM_LEVEL, &path);
+ ShellUtil::GetShortcutPath(ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, ShellUtil::SYSTEM_LEVEL, &path);
EXPECT_EQ(fake_common_start_menu_.path().Append(dist_->GetAppShortCutName()),
path);
}
@@ -212,11 +212,11 @@ TEST_F(ShellUtilShortcutTest, CreateStartMenuShortcutWithAllProperties) {
test_properties_->set_shortcut_name(L"Bobo le shortcut");
test_properties_->level = ShellUtil::SYSTEM_LEVEL;
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU,
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
dist_, *test_properties_,
ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
- ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
- *test_properties_);
+ ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, *test_properties_);
}
TEST_F(ShellUtilShortcutTest, ReplaceSystemLevelQuickLaunchShortcut) {
@@ -272,20 +272,20 @@ TEST_F(ShellUtilShortcutTest, UpdateAddDualModeToStartMenuShortcut) {
ShellUtil::ShortcutProperties properties(ShellUtil::CURRENT_USER);
product_->AddDefaultShortcutProperties(chrome_exe_, &properties);
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_, properties,
- ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, properties, ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
ShellUtil::ShortcutProperties added_properties(ShellUtil::CURRENT_USER);
added_properties.set_dual_mode(true);
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, dist_,
added_properties, ShellUtil::SHELL_SHORTCUT_UPDATE_EXISTING));
ShellUtil::ShortcutProperties expected_properties(properties);
expected_properties.set_dual_mode(true);
- ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
- expected_properties);
+ ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, expected_properties);
}
TEST_F(ShellUtilShortcutTest, CreateIfNoSystemLevel) {
@@ -319,11 +319,11 @@ TEST_F(ShellUtilShortcutTest, CreateIfNoSystemLevelWithSystemLevelPresent) {
TEST_F(ShellUtilShortcutTest, CreateIfNoSystemLevelStartMenu) {
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU,
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
dist_, *test_properties_,
ShellUtil::SHELL_SHORTCUT_CREATE_IF_NO_SYSTEM_LEVEL));
- ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_,
- *test_properties_);
+ ValidateChromeShortcut(ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
+ dist_, *test_properties_);
}
TEST_F(ShellUtilShortcutTest, CreateAlwaysUserWithSystemLevelPresent) {
@@ -515,12 +515,12 @@ TEST_F(ShellUtilShortcutTest, UpdateMultipleChromeShortcuts) {
TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) {
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU,
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
dist_, *test_properties_,
ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
test_properties_->set_shortcut_name(L"A second shortcut");
ASSERT_TRUE(ShellUtil::CreateOrUpdateShortcut(
- ShellUtil::SHORTCUT_LOCATION_START_MENU,
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR,
dist_, *test_properties_,
ShellUtil::SHELL_SHORTCUT_CREATE_ALWAYS));
@@ -535,8 +535,8 @@ TEST_F(ShellUtilShortcutTest, CreateMultipleStartMenuShortcutsAndRemoveFolder) {
ASSERT_TRUE(file_util::PathExists(shortcut_folder));
ASSERT_TRUE(ShellUtil::RemoveShortcuts(
- ShellUtil::SHORTCUT_LOCATION_START_MENU, dist_, ShellUtil::CURRENT_USER,
- chrome_exe_));
+ ShellUtil::SHORTCUT_LOCATION_START_MENU_CHROME_DIR, dist_,
+ ShellUtil::CURRENT_USER, chrome_exe_));
ASSERT_FALSE(file_util::PathExists(shortcut_folder));
}
« chrome/installer/util/shell_util.cc ('K') | « chrome/installer/util/shell_util.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698