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

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

Issue 467303004: Make 64-bit Chrome stable report as CHANNEL_STABLE (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: nits. add tests. Created 6 years, 4 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
« no previous file with comments | « chrome/installer/util/channel_info.cc ('k') | chrome/installer/util/util_constants.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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include <utility> 5 #include <utility>
6 6
7 #include "base/basictypes.h" 7 #include "base/basictypes.h"
8 #include "chrome/installer/util/channel_info.h" 8 #include "chrome/installer/util/channel_info.h"
9 #include "chrome/installer/util/util_constants.h" 9 #include "chrome/installer/util/util_constants.h"
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 ci.set_value(L"2.0-dev"); 43 ci.set_value(L"2.0-dev");
44 EXPECT_TRUE(ci.GetChannelName(&channel)); 44 EXPECT_TRUE(ci.GetChannelName(&channel));
45 EXPECT_EQ(kChannelDev, channel); 45 EXPECT_EQ(kChannelDev, channel);
46 ci.set_value(L"2.0-kinda-dev"); 46 ci.set_value(L"2.0-kinda-dev");
47 EXPECT_TRUE(ci.GetChannelName(&channel)); 47 EXPECT_TRUE(ci.GetChannelName(&channel));
48 EXPECT_EQ(kChannelDev, channel); 48 EXPECT_EQ(kChannelDev, channel);
49 ci.set_value(L"2.0-dev-eloper"); 49 ci.set_value(L"2.0-dev-eloper");
50 EXPECT_TRUE(ci.GetChannelName(&channel)); 50 EXPECT_TRUE(ci.GetChannelName(&channel));
51 EXPECT_EQ(kChannelDev, channel); 51 EXPECT_EQ(kChannelDev, channel);
52 52
53 ci.set_value(L"x64-dev");
54 EXPECT_TRUE(ci.GetChannelName(&channel));
55 EXPECT_EQ(kChannelDev, channel);
56 ci.set_value(L"x64-beta");
57 EXPECT_TRUE(ci.GetChannelName(&channel));
58 EXPECT_EQ(kChannelBeta, channel);
59 ci.set_value(L"x64-stable");
60 EXPECT_TRUE(ci.GetChannelName(&channel));
61 EXPECT_EQ(kChannelStable, channel);
62
53 ci.set_value(L"fuzzy"); 63 ci.set_value(L"fuzzy");
54 EXPECT_FALSE(ci.GetChannelName(&channel)); 64 EXPECT_FALSE(ci.GetChannelName(&channel));
55 } 65 }
56 66
57 TEST(ChannelInfoTest, FullInstall) { 67 TEST(ChannelInfoTest, FullInstall) {
58 ChannelInfo ci; 68 ChannelInfo ci;
59 69
60 ci.set_value(L""); 70 ci.set_value(L"");
61 EXPECT_TRUE(ci.SetFullSuffix(true)); 71 EXPECT_TRUE(ci.SetFullSuffix(true));
62 EXPECT_TRUE(ci.HasFullSuffix()); 72 EXPECT_TRUE(ci.HasFullSuffix());
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
241 ChannelInfo ci; 251 ChannelInfo ci;
242 252
243 ci.set_value(L""); 253 ci.set_value(L"");
244 EXPECT_FALSE(ci.RemoveAllModifiersAndSuffixes()); 254 EXPECT_FALSE(ci.RemoveAllModifiersAndSuffixes());
245 EXPECT_EQ(L"", ci.value()); 255 EXPECT_EQ(L"", ci.value());
246 256
247 ci.set_value(L"2.0-dev-multi-chrome-chromeframe-migrating"); 257 ci.set_value(L"2.0-dev-multi-chrome-chromeframe-migrating");
248 EXPECT_TRUE(ci.RemoveAllModifiersAndSuffixes()); 258 EXPECT_TRUE(ci.RemoveAllModifiersAndSuffixes());
249 EXPECT_EQ(L"2.0-dev", ci.value()); 259 EXPECT_EQ(L"2.0-dev", ci.value());
250 } 260 }
OLDNEW
« no previous file with comments | « chrome/installer/util/channel_info.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698