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

Unified Diff: chrome/install_static/install_modes_unittest.cc

Issue 2459583002: Use InstallDetails in setup. (Closed)
Patch Set: another doc comment Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/install_static/install_modes.cc ('k') | chrome/install_static/install_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_modes_unittest.cc
diff --git a/chrome/install_static/install_modes_unittest.cc b/chrome/install_static/install_modes_unittest.cc
index ad8ef9ef4dc800e1f5cca23c23fab4ba7ef33506..e4593633f434e36dc39274e5484e6e31715c6819 100644
--- a/chrome/install_static/install_modes_unittest.cc
+++ b/chrome/install_static/install_modes_unittest.cc
@@ -23,12 +23,24 @@ TEST(InstallModes, VerifyModes) {
// The modes must be listed in order.
ASSERT_THAT(mode.index, Eq(i));
+ // The first mode must have no install switch; the rest must have one.
+ if (i == 0)
+ ASSERT_THAT(mode.install_switch, StrEq(""));
+ else
+ ASSERT_THAT(mode.install_switch, StrNe(""));
+
// The first mode must have no suffix; the rest must have one.
if (i == 0)
ASSERT_THAT(mode.install_suffix, StrEq(L""));
else
ASSERT_THAT(mode.install_suffix, StrNe(L""));
+ // The first mode must have no logo suffix; the rest must have one.
+ if (i == 0)
+ ASSERT_THAT(mode.logo_suffix, StrEq(L""));
+ else
+ ASSERT_THAT(mode.logo_suffix, StrNe(L""));
+
// The modes must have an appguid if Google Update integration is supported.
if (kUseGoogleUpdateIntegration)
ASSERT_THAT(mode.app_guid, StrNe(L""));
@@ -55,6 +67,18 @@ TEST(InstallModes, VerifyBrand) {
}
}
+TEST(InstallModes, GetClientsKeyPath) {
+ constexpr wchar_t kAppGuid[] = L"test";
+
+ if (kUseGoogleUpdateIntegration) {
+ ASSERT_THAT(GetClientsKeyPath(kAppGuid),
+ StrEq(L"Software\\Google\\Update\\Clients\\test"));
+ } else {
+ ASSERT_THAT(GetClientsKeyPath(kAppGuid),
+ StrEq(std::wstring(L"Software\\").append(kProductPathName)));
+ }
+}
+
TEST(InstallModes, GetClientStateKeyPath) {
constexpr wchar_t kAppGuid[] = L"test";
@@ -67,6 +91,17 @@ TEST(InstallModes, GetClientStateKeyPath) {
}
}
+TEST(InstallModes, GetBinariesClientsKeyPath) {
+ if (kUseGoogleUpdateIntegration) {
+ ASSERT_THAT(GetBinariesClientsKeyPath(),
+ StrEq(std::wstring(L"Software\\Google\\Update\\Clients\\")
+ .append(kBinariesAppGuid)));
+ } else {
+ ASSERT_THAT(GetBinariesClientsKeyPath(),
+ StrEq(std::wstring(L"Software\\").append(kBinariesPathName)));
+ }
+}
+
TEST(InstallModes, GetBinariesClientStateKeyPath) {
if (kUseGoogleUpdateIntegration) {
ASSERT_THAT(GetBinariesClientStateKeyPath(),
« no previous file with comments | « chrome/install_static/install_modes.cc ('k') | chrome/install_static/install_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698