diff options
author | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:28:05 +0000 |
---|---|---|
committer | gab@chromium.org <gab@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-01-04 23:28:05 +0000 |
commit | 79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58 (patch) | |
tree | 6d453c2698175b5a5c39206f019c0bcb1dfdc06d /chrome/browser/shell_integration_unittest.cc | |
parent | 24c8eec50cd6d5d7efd9cf9a2b86b4fc4cf0d1bf (diff) | |
download | chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.zip chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.tar.gz chromium_src-79ca2d37ebc83fdd4fefa49389e490e8fbb3ce58.tar.bz2 |
[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
Diffstat (limited to 'chrome/browser/shell_integration_unittest.cc')
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 33 |
1 files changed, 1 insertions, 32 deletions
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 |