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

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

Issue 10790144: Revert 148046 - Revert 147650 - Implement installation of the Chrome App Host. (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1215/src/
Patch Set: Created 8 years, 5 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 | « chrome/installer/util/browser_distribution.cc ('k') | chrome/installer/util/channel_info.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/browser_distribution_unittest.cc
===================================================================
--- chrome/installer/util/browser_distribution_unittest.cc (revision 148103)
+++ chrome/installer/util/browser_distribution_unittest.cc (working copy)
@@ -1,50 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-//
-// Unit tests for BrowserDistribution class.
-
-#include "chrome/installer/util/browser_distribution.h"
-#include "chrome/installer/util/shell_util.h"
-#include "testing/gtest/include/gtest/gtest.h"
-
-// The distribution strings should not be empty. The unit tests are not linking
-// with the chrome resources so we cannot test official build.
-TEST(BrowserDistributionTest, StringsTest) {
- for (size_t i = 0; i < BrowserDistribution::kNumProductTypes; ++i) {
- BrowserDistribution* dist =
- BrowserDistribution::GetSpecificDistribution(
- BrowserDistribution::kProductTypes[i]);
- ASSERT_TRUE(dist != NULL);
- string16 name = dist->GetBaseAppName();
- EXPECT_FALSE(name.empty());
- string16 desc = dist->GetAppDescription();
- EXPECT_FALSE(desc.empty());
- string16 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(BrowserDistributionTest, AlternateAndNormalShortcutName) {
- string16 normal_name;
- string16 alternate_name;
- string16 appended_name_one;
- string16 appended_name_two;
- BrowserDistribution* dist = BrowserDistribution::GetDistribution();
- EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, false, L"",
- &normal_name));
- EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"",
- &alternate_name));
- EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"Sparky",
- &appended_name_one));
- EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"Sparkles",
- &appended_name_two));
- EXPECT_NE(normal_name, alternate_name);
- EXPECT_NE(appended_name_one, appended_name_two);
- EXPECT_FALSE(normal_name.empty());
- EXPECT_FALSE(alternate_name.empty());
- EXPECT_FALSE(appended_name_one.empty());
- EXPECT_FALSE(appended_name_two.empty());
-}
« no previous file with comments | « chrome/installer/util/browser_distribution.cc ('k') | chrome/installer/util/channel_info.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698