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

Side by Side Diff: chrome/browser/shell_integration_win_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: 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/shell_integration.h" 5 #include "chrome/browser/shell_integration.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/file_util.h" 9 #include "base/file_util.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); 192 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd"));
193 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); 193 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test"));
194 EXPECT_EQ(base_app_id + L".udd.UserDataTest", 194 EXPECT_EQ(base_app_id + L".udd.UserDataTest",
195 ShellIntegration::GetAppModelIdForProfile(base_app_id, 195 ShellIntegration::GetAppModelIdForProfile(base_app_id,
196 profile_path)); 196 profile_path));
197 } 197 }
198 198
199 TEST(ShellIntegrationWinTest, GetAppListAppModelIdForProfileTest) { 199 TEST(ShellIntegrationWinTest, GetAppListAppModelIdForProfileTest) {
200 string16 base_app_id(BrowserDistribution::GetDistribution()->GetBaseAppId()); 200 string16 base_app_id(BrowserDistribution::GetDistribution()->GetBaseAppId());
201 base_app_id.append(L"AppList"); 201 base_app_id.append(L"AppList");
202 string16 suffix;
203 ShellUtil::GetUserSpecificRegistrySuffix(&suffix);
204 base_app_id.append(suffix);
202 205
203 // Empty profile path should get chrome::kBrowserAppID + AppList 206 // Empty profile path should get chrome::kBrowserAppID + AppList
204 base::FilePath empty_path; 207 base::FilePath empty_path;
205 EXPECT_EQ(base_app_id, 208 EXPECT_EQ(base_app_id,
206 ShellIntegration::GetAppListAppModelIdForProfile(empty_path)); 209 ShellIntegration::GetAppListAppModelIdForProfile(empty_path));
207 210
208 // Default profile path should get chrome::kBrowserAppID + AppList 211 // Default profile path should get chrome::kBrowserAppID + AppList
209 base::FilePath default_user_data_dir; 212 base::FilePath default_user_data_dir;
210 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); 213 chrome::GetDefaultUserDataDirectory(&default_user_data_dir);
211 base::FilePath default_profile_path = 214 base::FilePath default_profile_path =
212 default_user_data_dir.AppendASCII(chrome::kInitialProfile); 215 default_user_data_dir.AppendASCII(chrome::kInitialProfile);
213 EXPECT_EQ(base_app_id, 216 EXPECT_EQ(base_app_id,
214 ShellIntegration::GetAppListAppModelIdForProfile( 217 ShellIntegration::GetAppListAppModelIdForProfile(
215 default_profile_path)); 218 default_profile_path));
216 219
217 // Non-default profile path should get chrome::kBrowserAppID + AppList joined 220 // Non-default profile path should get chrome::kBrowserAppID + AppList joined
218 // with profile info. 221 // with profile info.
219 base::FilePath profile_path(FILE_PATH_LITERAL("root")); 222 base::FilePath profile_path(FILE_PATH_LITERAL("root"));
220 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); 223 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd"));
221 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); 224 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test"));
222 EXPECT_EQ(base_app_id + L".udd.UserDataTest", 225 EXPECT_EQ(base_app_id + L".udd.UserDataTest",
223 ShellIntegration::GetAppListAppModelIdForProfile(profile_path)); 226 ShellIntegration::GetAppListAppModelIdForProfile(profile_path));
224 } 227 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698