| OLD | NEW |
| 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 <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 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 }; | 351 }; |
| 352 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { | 352 for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { |
| 353 SCOPED_TRACE(i); | 353 SCOPED_TRACE(i); |
| 354 EXPECT_EQ( | 354 EXPECT_EQ( |
| 355 test_cases[i].expected_output, | 355 test_cases[i].expected_output, |
| 356 ShellIntegrationLinux::GetDesktopFileContents( | 356 ShellIntegrationLinux::GetDesktopFileContents( |
| 357 test_cases[i].template_contents, | 357 test_cases[i].template_contents, |
| 358 web_app::GenerateApplicationNameFromURL(GURL(test_cases[i].url)), | 358 web_app::GenerateApplicationNameFromURL(GURL(test_cases[i].url)), |
| 359 GURL(test_cases[i].url), | 359 GURL(test_cases[i].url), |
| 360 "", | 360 "", |
| 361 false, | |
| 362 FilePath(), | 361 FilePath(), |
| 363 ASCIIToUTF16(test_cases[i].title), | 362 ASCIIToUTF16(test_cases[i].title), |
| 364 test_cases[i].icon_name, | 363 test_cases[i].icon_name, |
| 365 FilePath())); | 364 FilePath())); |
| 366 } | 365 } |
| 367 } | 366 } |
| 368 #elif defined(OS_WIN) | 367 #elif defined(OS_WIN) |
| 369 TEST(ShellIntegrationTest, GetAppModelIdForProfileTest) { | 368 TEST(ShellIntegrationTest, GetAppModelIdForProfileTest) { |
| 370 const string16 base_app_id( | 369 const string16 base_app_id( |
| 371 BrowserDistribution::GetDistribution()->GetBaseAppId()); | 370 BrowserDistribution::GetDistribution()->GetBaseAppId()); |
| (...skipping 15 matching lines...) Expand all Loading... |
| 387 // Non-default profile path should get chrome::kBrowserAppID joined with | 386 // Non-default profile path should get chrome::kBrowserAppID joined with |
| 388 // profile info. | 387 // profile info. |
| 389 FilePath profile_path(FILE_PATH_LITERAL("root")); | 388 FilePath profile_path(FILE_PATH_LITERAL("root")); |
| 390 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); | 389 profile_path = profile_path.Append(FILE_PATH_LITERAL("udd")); |
| 391 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); | 390 profile_path = profile_path.Append(FILE_PATH_LITERAL("User Data - Test")); |
| 392 EXPECT_EQ(base_app_id + L".udd.UserDataTest", | 391 EXPECT_EQ(base_app_id + L".udd.UserDataTest", |
| 393 ShellIntegration::GetAppModelIdForProfile(base_app_id, | 392 ShellIntegration::GetAppModelIdForProfile(base_app_id, |
| 394 profile_path)); | 393 profile_path)); |
| 395 } | 394 } |
| 396 #endif | 395 #endif |
| OLD | NEW |