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

Unified Diff: chrome/installer/util/google_chrome_distribution_unittest.cc

Issue 60067: Fix distribution test that fails in official build... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/google_chrome_distribution_unittest.cc
===================================================================
--- chrome/installer/util/google_chrome_distribution_unittest.cc (revision 12754)
+++ chrome/installer/util/google_chrome_distribution_unittest.cc (working copy)
@@ -228,6 +228,31 @@
EXPECT_EQ(expected_url_string, uninstall_metrics_string);
}
+#else
+// The distribution strings should not be empty. The unit tests are not linking
+// with the chrome resources so we cannot test official build.
+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();
+ 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());
+}
#endif
TEST(MasterPreferences, ParseDistroParams) {
@@ -271,26 +296,3 @@
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();
- 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());
-}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698