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

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

Issue 8502033: Add Windows desktop shortcut for multiple profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: rebase Created 9 years 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
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 BrowserDistribution class. 5 // Unit tests for BrowserDistribution class.
6 6
7 #include "chrome/installer/util/browser_distribution.h" 7 #include "chrome/installer/util/browser_distribution.h"
8 #include "chrome/installer/util/shell_util.h" 8 #include "chrome/installer/util/shell_util.h"
9 #include "testing/gtest/include/gtest/gtest.h" 9 #include "testing/gtest/include/gtest/gtest.h"
10 10
(...skipping 25 matching lines...) Expand all
36 std::wstring alt_name = dist->GetAlternateApplicationName(); 36 std::wstring alt_name = dist->GetAlternateApplicationName();
37 EXPECT_FALSE(alt_name.empty()); 37 EXPECT_FALSE(alt_name.empty());
38 } 38 }
39 } 39 }
40 40
41 // The shortcut strings obtained by the shell utility functions should not 41 // The shortcut strings obtained by the shell utility functions should not
42 // be empty or be the same. 42 // be empty or be the same.
43 TEST(BrowserDistributionTest, AlternateAndNormalShortcutName) { 43 TEST(BrowserDistributionTest, AlternateAndNormalShortcutName) {
44 std::wstring normal_name; 44 std::wstring normal_name;
45 std::wstring alternate_name; 45 std::wstring alternate_name;
46 std::wstring appended_name_one;
47 std::wstring appended_name_two;
46 BrowserDistribution* dist = BrowserDistribution::GetDistribution(); 48 BrowserDistribution* dist = BrowserDistribution::GetDistribution();
47 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, &normal_name, false)); 49 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, false, L"",
48 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, &alternate_name, true)); 50 &normal_name));
51 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"",
52 &alternate_name));
53 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"Sparky",
54 &appended_name_one));
55 EXPECT_TRUE(ShellUtil::GetChromeShortcutName(dist, true, L"Sparkles",
56 &appended_name_two));
49 EXPECT_NE(normal_name, alternate_name); 57 EXPECT_NE(normal_name, alternate_name);
58 EXPECT_NE(appended_name_one, appended_name_two);
50 EXPECT_FALSE(normal_name.empty()); 59 EXPECT_FALSE(normal_name.empty());
51 EXPECT_FALSE(alternate_name.empty()); 60 EXPECT_FALSE(alternate_name.empty());
61 EXPECT_FALSE(appended_name_one.empty());
62 EXPECT_FALSE(appended_name_two.empty());
52 } 63 }
OLDNEW
« no previous file with comments | « chrome/installer/setup/install.cc ('k') | chrome/installer/util/shell_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698