diff options
author | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 17:47:36 +0000 |
---|---|---|
committer | cpu@google.com <cpu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-26 17:47:36 +0000 |
commit | 9a9dbcd796ab83a4156bc94bb4ce87273e567f5f (patch) | |
tree | cc10927c4299cdf73542346a2817a80464ba4472 | |
parent | e5dd42d1b9ff1e01a8d4705974c257379b261ca6 (diff) | |
download | chromium_src-9a9dbcd796ab83a4156bc94bb4ce87273e567f5f.zip chromium_src-9a9dbcd796ab83a4156bc94bb4ce87273e567f5f.tar.gz chromium_src-9a9dbcd796ab83a4156bc94bb4ce87273e567f5f.tar.bz2 |
Final wiring of the distribution strings
- updated unittests
BUG=1640034
BUG=1522969
Review URL: http://codereview.chromium.org/49036
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@12567 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/installer/util/google_chrome_distribution.cc | 10 | ||||
-rw-r--r-- | chrome/installer/util/google_chrome_distribution_unittest.cc | 10 |
2 files changed, 14 insertions, 6 deletions
diff --git a/chrome/installer/util/google_chrome_distribution.cc b/chrome/installer/util/google_chrome_distribution.cc index d2fb9f51..7766484 100644 --- a/chrome/installer/util/google_chrome_distribution.cc +++ b/chrome/installer/util/google_chrome_distribution.cc @@ -165,8 +165,9 @@ std::wstring GoogleChromeDistribution::GetApplicationName() { } std::wstring GoogleChromeDistribution::GetAlternateApplicationName() { - // TODO(cpu): return the right localized strings when it arrives. - return L""; + const std::wstring& alt_product_name = + installer_util::GetLocalizedString(IDS_OEM_MAIN_SHORTCUT_NAME_BASE); + return alt_product_name; } std::wstring GoogleChromeDistribution::GetInstallSubDir() { @@ -206,8 +207,9 @@ std::wstring GoogleChromeDistribution::GetPublisherName() { } std::wstring GoogleChromeDistribution::GetAppDescription() { - // TODO(cpu): Wire the actual localized strings when they arrive. - return L""; + const std::wstring& app_description = + installer_util::GetLocalizedString(IDS_SHORTCUT_TOOLTIP_BASE); + return app_description; } int GoogleChromeDistribution::GetInstallReturnCode( diff --git a/chrome/installer/util/google_chrome_distribution_unittest.cc b/chrome/installer/util/google_chrome_distribution_unittest.cc index c2064c3..0682c11 100644 --- a/chrome/installer/util/google_chrome_distribution_unittest.cc +++ b/chrome/installer/util/google_chrome_distribution_unittest.cc @@ -271,20 +271,26 @@ TEST(MasterPreferences, ParseDistroParams) { EXPECT_TRUE(file_util::Delete(prefs, false)); } +// The distribution strings should not be empty on chrome or chromium distros. TEST(BrowserDistribution, StringsTest) { BrowserDistribution *dist = BrowserDistribution::GetDistribution(); ASSERT_TRUE(dist != NULL); std::wstring name = dist->GetApplicationName(); + EXPECT_FALSE(name.empty()); std::wstring desc = dist->GetAppDescription(); + EXPECT_FALSE(desc.empty()); std::wstring alt_name = dist->GetAlternateApplicationName(); - // TODO(cpu) finish the test when the translated strings arrive. + EXPECT_FALSE(alt_name.empty()); } +// The shortcut strings obtained by the shell utility functions should not +// be empty or be the same. TEST(BrowserDistribution, AlternateAndNormalShortcutName) { std::wstring normal_name; std::wstring alternate_name; EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&normal_name, false)); EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&alternate_name, true)); EXPECT_NE(normal_name, alternate_name); + EXPECT_FALSE(normal_name.empty()); + EXPECT_FALSE(alternate_name.empty()); } - |