From 79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58 Mon Sep 17 00:00:00 2001 From: "gab@chromium.org" Date: Fri, 4 Jan 2013 23:28:05 +0000 Subject: [Fixit-Dec-2012] Also add dual_mode to Start Menu shortcuts in MigrateChromiumShortcuts. Restructured this code quite a bit to use the new shortcut magic. Added tests which turned out to expose edge cases that I think weren't covered by the previous implementation (i.e. would potentially update shortcuts when unecessary -- flashing the desktop in the process -- or not do it when necessary). BUG=142980 TEST=Pin Desktop shortcut to Start Screen or pin chrome.exe directly to the start screen via context menu. Notice that there are now multiple shortcuts of Chrome (non-tiled; 1 for each "Pin to Start" action; upon launching Chrome those should all be merged down to one Chrome tile shortcut (not on the file system, but visually on the Start Screen itself). Note: if you do try this; there is an intentional 15s delay before the migration kicks in to avoid delaying Chrome startup; so be patient, it will work ;)! Review URL: https://chromiumcodereview.appspot.com/11712003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@175230 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/shell_integration_unittest.cc | 33 +--------------------------- 1 file changed, 1 insertion(+), 32 deletions(-) (limited to 'chrome/browser/shell_integration_unittest.cc') diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index f344cfc..7179cbc 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -15,14 +15,11 @@ #include "base/utf_string_conversions.h" #include "chrome/browser/web_applications/web_app.h" #include "chrome/common/chrome_constants.h" -#include "chrome/common/chrome_paths_internal.h" #include "content/public/test/test_browser_thread.h" #include "googleurl/src/gurl.h" #include "testing/gtest/include/gtest/gtest.h" -#if defined(OS_WIN) -#include "chrome/installer/util/browser_distribution.h" -#elif defined(OS_POSIX) && !defined(OS_MACOSX) +#if defined(OS_POSIX) && !defined(OS_MACOSX) #include "base/environment.h" #include "chrome/browser/shell_integration_linux.h" #endif @@ -364,32 +361,4 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) { FilePath())); } } -#elif defined(OS_WIN) -TEST(ShellIntegrationTest, GetAppModelIdForProfileTest) { - const string16 base_app_id( - BrowserDistribution::GetDistribution()->GetBaseAppId()); - - // Empty profile path should get chrome::kBrowserAppID - FilePath empty_path; - EXPECT_EQ(base_app_id, - ShellIntegration::GetAppModelIdForProfile(base_app_id, empty_path)); - - // Default profile path should get chrome::kBrowserAppID - FilePath default_user_data_dir; - chrome::GetDefaultUserDataDirectory(&default_user_data_dir); - FilePath default_profile_path = - default_user_data_dir.AppendASCII(chrome::kInitialProfile); - EXPECT_EQ(base_app_id, - ShellIntegration::GetAppModelIdForProfile(base_app_id, - default_profile_path)); - - // Non-default profile path should get chrome::kBrowserAppID joined with - // profile info. - FilePath profile_path(FILE_PATH_LITERAL("root")); - profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); - profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); - EXPECT_EQ(base_app_id + L".udd.UserDataTest", - ShellIntegration::GetAppModelIdForProfile(base_app_id, - profile_path)); -} #endif -- cgit v1.1