| 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 <windows.h> | 7 #include <windows.h> |
| 8 | 8 |
| 9 #include <ctype.h> | 9 #include <ctype.h> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 ASSERT_THAT(mode.logo_suffix, StrEq(L"")); | 63 ASSERT_THAT(mode.logo_suffix, StrEq(L"")); |
| 64 else | 64 else |
| 65 ASSERT_THAT(mode.logo_suffix, StrNe(L"")); | 65 ASSERT_THAT(mode.logo_suffix, StrNe(L"")); |
| 66 | 66 |
| 67 // The modes must have an appguid if Google Update integration is supported. | 67 // The modes must have an appguid if Google Update integration is supported. |
| 68 if (kUseGoogleUpdateIntegration) | 68 if (kUseGoogleUpdateIntegration) |
| 69 ASSERT_THAT(mode.app_guid, StrNe(L"")); | 69 ASSERT_THAT(mode.app_guid, StrNe(L"")); |
| 70 else | 70 else |
| 71 ASSERT_THAT(mode.app_guid, StrEq(L"")); | 71 ASSERT_THAT(mode.app_guid, StrEq(L"")); |
| 72 | 72 |
| 73 // Every mode must have a base app name. |
| 74 ASSERT_THAT(mode.base_app_name, StrNe(L"")); |
| 75 |
| 76 // Every mode must have a base app id. |
| 77 ASSERT_THAT(mode.base_app_id, StrNe(L"")); |
| 78 |
| 73 // The ProgID prefix must not be empty, must be no greater than 11 | 79 // The ProgID prefix must not be empty, must be no greater than 11 |
| 74 // characters long, must contain no punctuation, and may not start with a | 80 // characters long, must contain no punctuation, and may not start with a |
| 75 // digit (https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx). | 81 // digit (https://msdn.microsoft.com/library/windows/desktop/dd542719.aspx). |
| 76 ASSERT_THAT(mode.prog_id_prefix, StrNe(L"")); | 82 ASSERT_THAT(mode.prog_id_prefix, StrNe(L"")); |
| 77 ASSERT_THAT(lstrlen(mode.prog_id_prefix), Le(11)); | 83 ASSERT_THAT(lstrlen(mode.prog_id_prefix), Le(11)); |
| 78 ASSERT_THAT(mode.prog_id_prefix, Not(ContainsIllegalProgIdChar())); | 84 ASSERT_THAT(mode.prog_id_prefix, Not(ContainsIllegalProgIdChar())); |
| 79 ASSERT_THAT(*mode.prog_id_prefix, ResultOf(iswdigit, Eq(0))); | 85 ASSERT_THAT(*mode.prog_id_prefix, ResultOf(iswdigit, Eq(0))); |
| 80 | 86 |
| 81 // The ProgID description must not be empty. | 87 // The ProgID description must not be empty. |
| 82 ASSERT_THAT(mode.prog_id_description, StrNe(L"")); | 88 ASSERT_THAT(mode.prog_id_description, StrNe(L"")); |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 168 GetBinariesClientStateMediumKeyPath(), | 174 GetBinariesClientStateMediumKeyPath(), |
| 169 StrEq(std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") | 175 StrEq(std::wstring(L"Software\\Google\\Update\\ClientStateMedium\\") |
| 170 .append(kBinariesAppGuid))); | 176 .append(kBinariesAppGuid))); |
| 171 } else { | 177 } else { |
| 172 ASSERT_THAT(GetBinariesClientStateMediumKeyPath(), | 178 ASSERT_THAT(GetBinariesClientStateMediumKeyPath(), |
| 173 StrEq(std::wstring(L"Software\\").append(kBinariesPathName))); | 179 StrEq(std::wstring(L"Software\\").append(kBinariesPathName))); |
| 174 } | 180 } |
| 175 } | 181 } |
| 176 | 182 |
| 177 } // namespace install_static | 183 } // namespace install_static |
| OLD | NEW |