From 98566d7a0f5396b4fda4863b4036bed441316b2f Mon Sep 17 00:00:00 2001 From: "benwells@chromium.org" Date: Tue, 17 Apr 2012 00:28:56 +0000 Subject: Moved Linux specific shell integration declarations into own header. This continues refactoring started in http://codereview.chromium.org/9958006/ BUG=None TEST=Refactor; covered by existing tests Review URL: http://codereview.chromium.org/10097004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@132489 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/shell_integration_unittest.cc | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'chrome/browser/shell_integration_unittest.cc') diff --git a/chrome/browser/shell_integration_unittest.cc b/chrome/browser/shell_integration_unittest.cc index b026431..51f9183 100644 --- a/chrome/browser/shell_integration_unittest.cc +++ b/chrome/browser/shell_integration_unittest.cc @@ -24,6 +24,7 @@ #include "chrome/installer/util/browser_distribution.h" #elif defined(OS_POSIX) && !defined(OS_MACOSX) #include "base/environment.h" +#include "chrome/browser/shell_integration_linux.h" #endif #define FPL FILE_PATH_LITERAL @@ -92,8 +93,8 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { temp_dir.path().AppendASCII(kTemplateFilename), kTestData1, strlen(kTestData1))); std::string contents; - ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env, - &contents)); + ASSERT_TRUE(ShellIntegrationLinux::GetDesktopShortcutTemplate(&env, + &contents)); EXPECT_EQ(kTestData1, contents); } @@ -110,8 +111,8 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { .AppendASCII(kTemplateFilename), kTestData2, strlen(kTestData2))); std::string contents; - ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env, - &contents)); + ASSERT_TRUE(ShellIntegrationLinux::GetDesktopShortcutTemplate(&env, + &contents)); EXPECT_EQ(kTestData2, contents); } @@ -132,8 +133,8 @@ TEST(ShellIntegrationTest, GetDesktopShortcutTemplate) { .AppendASCII(kTemplateFilename), kTestData2, strlen(kTestData2))); std::string contents; - ASSERT_TRUE(ShellIntegration::GetDesktopShortcutTemplate(&env, - &contents)); + ASSERT_TRUE(ShellIntegrationLinux::GetDesktopShortcutTemplate(&env, + &contents)); EXPECT_EQ(kTestData1, contents); } } @@ -155,7 +156,7 @@ TEST(ShellIntegrationTest, GetDesktopShortcutFilename) { for (size_t i = 0; i < ARRAYSIZE_UNSAFE(test_cases); i++) { EXPECT_EQ(std::string(chrome::kBrowserProcessExecutableName) + "-" + test_cases[i].path, - ShellIntegration::GetDesktopShortcutFilename( + ShellIntegrationLinux::GetDesktopShortcutFilename( GURL(test_cases[i].url)).value()) << " while testing " << test_cases[i].url; } @@ -352,7 +353,7 @@ TEST(ShellIntegrationTest, GetDesktopFileContents) { SCOPED_TRACE(i); EXPECT_EQ( test_cases[i].expected_output, - ShellIntegration::GetDesktopFileContents( + ShellIntegrationLinux::GetDesktopFileContents( test_cases[i].template_contents, web_app::GenerateApplicationNameFromURL(GURL(test_cases[i].url)), GURL(test_cases[i].url), -- cgit v1.1