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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: chrome/installer/setup/brand_constants_unittest.cc
diff --git a/chrome/installer/setup/brand_constants_unittest.cc b/chrome/installer/setup/brand_constants_unittest.cc
new file mode 100644
index 0000000000000000000000000000000000000000..df5218670eb7875429077349ebf6c2cbcf6e8450
--- /dev/null
+++ b/chrome/installer/setup/brand_constants_unittest.cc
@@ -0,0 +1,34 @@
+// Copyright 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "chrome/installer/setup/brand_constants.h"
+
+#include "chrome/install_static/install_modes.h"
+#include "testing/gmock/include/gmock/gmock.h"
+#include "testing/gtest/include/gtest/gtest.h"
+
+using ::testing::Eq;
+using ::testing::StrEq;
+using ::testing::StrNe;
+
+TEST(BrandConstants, VerifyConstants) {
+ for (int i = 0; i < install_static::NUM_INSTALL_MODES; ++i) {
+ const BrandConstants& brand = kBrandConstants[i];
+
+ // The brands must be listed in order.
+ ASSERT_THAT(brand.index, Eq(i));
+
+ // The first must have no install switch; the rest must have one.
+ if (i == 0)
+ ASSERT_THAT(brand.install_switch, StrEq(""));
+ else
+ ASSERT_THAT(brand.install_switch, StrNe(""));
+
+ // The first must have no logo suffix; the rest must have one.
+ if (i == 0)
+ ASSERT_THAT(brand.logo_suffix, StrEq(L""));
+ else
+ ASSERT_THAT(brand.logo_suffix, StrNe(L""));
+ }
+}

Powered by Google App Engine
This is Rietveld 408576698