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

Side by Side Diff: chrome/installer/setup/brand_constants_unittest.cc

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: Created 4 years, 1 month 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
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "chrome/installer/setup/brand_constants.h"
6
7 #include "chrome/install_static/install_modes.h"
8 #include "testing/gmock/include/gmock/gmock.h"
9 #include "testing/gtest/include/gtest/gtest.h"
10
11 using ::testing::Eq;
12 using ::testing::StrEq;
13 using ::testing::StrNe;
14
15 TEST(BrandConstants, VerifyConstants) {
16 for (int i = 0; i < install_static::NUM_INSTALL_MODES; ++i) {
17 const BrandConstants& brand = kBrandConstants[i];
18
19 // The brands must be listed in order.
20 ASSERT_THAT(brand.index, Eq(i));
21
22 // The first must have no install switch; the rest must have one.
23 if (i == 0)
24 ASSERT_THAT(brand.install_switch, StrEq(""));
25 else
26 ASSERT_THAT(brand.install_switch, StrNe(""));
27
28 // The first must have no logo suffix; the rest must have one.
29 if (i == 0)
30 ASSERT_THAT(brand.logo_suffix, StrEq(L""));
31 else
32 ASSERT_THAT(brand.logo_suffix, StrNe(L""));
33 }
34 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698