diff options
author | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 04:32:10 +0000 |
---|---|---|
committer | grt@chromium.org <grt@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-06-19 04:32:10 +0000 |
commit | a0448004098a36c0f81cbacadf91be55f9363dc7 (patch) | |
tree | 4377d9460726f1e0f19296ad87e21066bd906c3d /chrome/browser/shell_integration_unittest.cc | |
parent | 8505831392922851d8b42869bc0ee82b66f982ad (diff) | |
download | chromium_src-a0448004098a36c0f81cbacadf91be55f9363dc7.zip chromium_src-a0448004098a36c0f81cbacadf91be55f9363dc7.tar.gz chromium_src-a0448004098a36c0f81cbacadf91be55f9363dc7.tar.bz2 |
Suffix Chrome's appid on user-level installs
ShellIntegration::GetAppId() --> ShellIntegration::GetProfileAppId() for clarity (i.e. having two functions called "GetAppId" is confusing imo).
Patch From Gabriel Charette <gab@chromium.org>
BUG=125362, 133173
TEST=Make sure 125362 doesn't repro.
http://goo.gl/ZZ7gE
ShellIntegrationTest.GetAppModelIdForProfileTest
ShellUtilTest.BuildAppModelId*
SessionRestoreTest.RestoreAfterClosingTabbedBrowserWithAppAndLaunching
AppModeTest.EnableAppModeTest
Review URL: https://chromiumcodereview.appspot.com/10542031
Patch from Gabriel Charette <gab@chromium.org>.
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@142909 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/shell_integration_unittest.cc')
-rw-r--r-- | chrome/browser/shell_integration_unittest.cc | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index 714e295..b6168c7 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -365,27 +365,31 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) { } } #elif defined(OS_WIN) -TEST(ShellIntegrationTest, GetChromiumAppIdTest) { +TEST(ShellIntegrationTest, GetAppModelIdForProfileTest) { + const string16 base_app_id( + BrowserDistribution::GetDistribution()->GetBaseAppId()); + // Empty profile path should get chrome::kBrowserAppID FilePath empty_path; - EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), - ShellIntegration::GetChromiumAppId(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(BrowserDistribution::GetDistribution()->GetBrowserAppId(), - ShellIntegration::GetChromiumAppId(default_profile_path)); + 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(BrowserDistribution::GetDistribution()->GetBrowserAppId() + - L".udd.UserDataTest", - ShellIntegration::GetChromiumAppId(profile_path)); + EXPECT_EQ(base_app_id + L".udd.UserDataTest", + ShellIntegration::GetAppModelIdForProfile(base_app_id, + profile_path)); } #endif |