| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 "chrome/install_static/install_modes.h" | 5 #include "chrome/install_static/install_modes.h" |
| 6 | 6 |
| 7 #include "testing/gmock/include/gmock/gmock.h" | 7 #include "testing/gmock/include/gmock/gmock.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 using ::testing::Eq; | 10 using ::testing::Eq; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 // UNSUPPORTED and kUseGoogleUpdateIntegration are mutually exclusive. | 38 // UNSUPPORTED and kUseGoogleUpdateIntegration are mutually exclusive. |
| 39 if (kUseGoogleUpdateIntegration) | 39 if (kUseGoogleUpdateIntegration) |
| 40 ASSERT_THAT(mode.channel_strategy, Ne(ChannelStrategy::UNSUPPORTED)); | 40 ASSERT_THAT(mode.channel_strategy, Ne(ChannelStrategy::UNSUPPORTED)); |
| 41 else | 41 else |
| 42 ASSERT_THAT(mode.channel_strategy, Eq(ChannelStrategy::UNSUPPORTED)); | 42 ASSERT_THAT(mode.channel_strategy, Eq(ChannelStrategy::UNSUPPORTED)); |
| 43 } | 43 } |
| 44 } | 44 } |
| 45 | 45 |
| 46 TEST(InstallModes, VerifyBrand) { | 46 TEST(InstallModes, VerifyBrand) { |
| 47 if (kUseGoogleUpdateIntegration) { | 47 if (kUseGoogleUpdateIntegration) { |
| 48 // Binaries are registered under an app guid with Google Update integration. | 48 // Binaries were registered via an app guid with Google Update integration. |
| 49 ASSERT_THAT(kBinariesAppGuid, StrNe(L"")); | 49 ASSERT_THAT(kBinariesAppGuid, StrNe(L"")); |
| 50 ASSERT_THAT(kBinariesPathName, StrEq(L"")); | 50 ASSERT_THAT(kBinariesPathName, StrEq(L"")); |
| 51 } else { | 51 } else { |
| 52 // Binaries are registered under a different path name without. | 52 // Binaries were registered via a different path name without. |
| 53 ASSERT_THAT(kBinariesAppGuid, StrEq(L"")); | 53 ASSERT_THAT(kBinariesAppGuid, StrEq(L"")); |
| 54 ASSERT_THAT(kBinariesPathName, StrNe(L"")); | 54 ASSERT_THAT(kBinariesPathName, StrNe(L"")); |
| 55 } | 55 } |
| 56 } | 56 } |
| 57 | 57 |
| 58 TEST(InstallModes, GetClientStateKeyPath) { | 58 TEST(InstallModes, GetClientStateKeyPath) { |
| 59 constexpr wchar_t kAppGuid[] = L"test"; | 59 constexpr wchar_t kAppGuid[] = L"test"; |
| 60 | 60 |
| 61 if (kUseGoogleUpdateIntegration) { | 61 if (kUseGoogleUpdateIntegration) { |
| 62 ASSERT_THAT(GetClientStateKeyPath(kAppGuid), | 62 ASSERT_THAT(GetClientStateKeyPath(kAppGuid), |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 GetBinariesClientStateMediumKeyPath(), | 96 GetBinariesClientStateMediumKeyPath(), |
| 97 StrEq(std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") | 97 StrEq(std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") |
| 98 .append(kBinariesAppGuid))); | 98 .append(kBinariesAppGuid))); |
| 99 } else { | 99 } else { |
| 100 ASSERT_THAT(GetBinariesClientStateMediumKeyPath(), | 100 ASSERT_THAT(GetBinariesClientStateMediumKeyPath(), |
| 101 StrEq(std::wstring(L"Software\\").append(kBinariesPathName))); | 101 StrEq(std::wstring(L"Software\\").append(kBinariesPathName))); |
| 102 } | 102 } |
| 103 } | 103 } |
| 104 | 104 |
| 105 } // namespace install_static | 105 } // namespace install_static |
| OLD | NEW |