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

Side by Side Diff: chrome/installer/util/google_chrome_distribution_unittest.cc

Issue 49036: Final wiring of the distribution strings... (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 // Unit tests for GoogleChromeDistribution class. 5 // Unit tests for GoogleChromeDistribution class.
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 #include "base/registry.h" 9 #include "base/registry.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_CREATE_ALL_SHORTCUTS); 264 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_CREATE_ALL_SHORTCUTS);
265 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_DO_NOT_LAUNCH_CHROME); 265 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_DO_NOT_LAUNCH_CHROME);
266 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_MAKE_CHROME_DEFAULT); 266 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_MAKE_CHROME_DEFAULT);
267 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_SYSTEM_LEVEL); 267 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_SYSTEM_LEVEL);
268 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_VERBOSE_LOGGING); 268 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_VERBOSE_LOGGING);
269 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_REQUIRE_EULA); 269 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_REQUIRE_EULA);
270 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_ALT_SHORTCUT_TXT); 270 EXPECT_TRUE(result & installer_util::MASTER_PROFILE_ALT_SHORTCUT_TXT);
271 EXPECT_TRUE(file_util::Delete(prefs, false)); 271 EXPECT_TRUE(file_util::Delete(prefs, false));
272 } 272 }
273 273
274 // The distribution strings should not be empty on chrome or chromium distros.
274 TEST(BrowserDistribution, StringsTest) { 275 TEST(BrowserDistribution, StringsTest) {
275 BrowserDistribution *dist = BrowserDistribution::GetDistribution(); 276 BrowserDistribution *dist = BrowserDistribution::GetDistribution();
276 ASSERT_TRUE(dist != NULL); 277 ASSERT_TRUE(dist != NULL);
277 std::wstring name = dist->GetApplicationName(); 278 std::wstring name = dist->GetApplicationName();
279 EXPECT_FALSE(name.empty());
278 std::wstring desc = dist->GetAppDescription(); 280 std::wstring desc = dist->GetAppDescription();
281 EXPECT_FALSE(desc.empty());
279 std::wstring alt_name = dist->GetAlternateApplicationName(); 282 std::wstring alt_name = dist->GetAlternateApplicationName();
280 // TODO(cpu) finish the test when the translated strings arrive. 283 EXPECT_FALSE(alt_name.empty());
281 } 284 }
282 285
286 // The shortcut strings obtained by the shell utility functions should not
287 // be empty or be the same.
283 TEST(BrowserDistribution, AlternateAndNormalShortcutName) { 288 TEST(BrowserDistribution, AlternateAndNormalShortcutName) {
284 std::wstring normal_name; 289 std::wstring normal_name;
285 std::wstring alternate_name; 290 std::wstring alternate_name;
286 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&normal_name, false)); 291 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&normal_name, false));
287 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&alternate_name, true)); 292 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(&alternate_name, true));
288 EXPECT_NE(normal_name, alternate_name); 293 EXPECT_NE(normal_name, alternate_name);
294 EXPECT_FALSE(normal_name.empty());
295 EXPECT_FALSE(alternate_name.empty());
289 } 296 }
290
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698