OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> | 7 #include <map> |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
300 TEST(ShellIntegrationTest, GetChromiumAppIdTest) { | 300 TEST(ShellIntegrationTest, GetChromiumAppIdTest) { |
301 // Empty profile path should get chrome::kBrowserAppID | 301 // Empty profile path should get chrome::kBrowserAppID |
302 FilePath empty_path; | 302 FilePath empty_path; |
303 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), | 303 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), |
304 ShellIntegration::GetChromiumAppId(empty_path)); | 304 ShellIntegration::GetChromiumAppId(empty_path)); |
305 | 305 |
306 // Default profile path should get chrome::kBrowserAppID | 306 // Default profile path should get chrome::kBrowserAppID |
307 FilePath default_user_data_dir; | 307 FilePath default_user_data_dir; |
308 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); | 308 chrome::GetDefaultUserDataDirectory(&default_user_data_dir); |
309 FilePath default_profile_path = | 309 FilePath default_profile_path = |
310 default_user_data_dir.Append(chrome::kNotSignedInProfile); | 310 default_user_data_dir.AppendASCII(chrome::kNotSignedInProfile); |
311 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), | 311 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId(), |
312 ShellIntegration::GetChromiumAppId(default_profile_path)); | 312 ShellIntegration::GetChromiumAppId(default_profile_path)); |
313 | 313 |
314 // Non-default profile path should get chrome::kBrowserAppID joined with | 314 // Non-default profile path should get chrome::kBrowserAppID joined with |
315 // profile info. | 315 // profile info. |
316 FilePath profile_path(FILE_PATH_LITERAL("root")); | 316 FilePath profile_path(FILE_PATH_LITERAL("root")); |
317 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 317 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
318 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 318 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
319 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + | 319 EXPECT_EQ(BrowserDistribution::GetDistribution()->GetBrowserAppId() + |
320 L".udd.UserDataTest", | 320 L".udd.UserDataTest", |
321 ShellIntegration::GetChromiumAppId(profile_path)); | 321 ShellIntegration::GetChromiumAppId(profile_path)); |
322 } | 322 } |
323 #endif | 323 #endif |
OLD | NEW |