OLD | NEW |
(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 } |
OLD | NEW |