Chromium Code Reviews| 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 e4593633f434e36dc39274e5484e6e31715c6819..c9c7c56f6969feb8cb6d6967ecc44cac98cb45b2 100644 |
| --- a/chrome/install_static/install_modes_unittest.cc |
| +++ b/chrome/install_static/install_modes_unittest.cc |
| @@ -4,11 +4,14 @@ |
| #include "chrome/install_static/install_modes.h" |
| +#include <windows.h> |
| + |
| #include "testing/gmock/include/gmock/gmock.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| using ::testing::Eq; |
| using ::testing::Gt; |
| +using ::testing::Le; |
| using ::testing::Ne; |
| using ::testing::StrEq; |
| using ::testing::StrNe; |
| @@ -47,6 +50,14 @@ TEST(InstallModes, VerifyModes) { |
| else |
| ASSERT_THAT(mode.app_guid, StrEq(L"")); |
| + // The ProgID prefix must not be empty and must be no greater than 11 |
| + // characters long. |
| + ASSERT_THAT(mode.prog_id_prefix, StrNe(L"")); |
| + ASSERT_THAT(lstrlen(mode.prog_id_prefix), Le(11)); |
|
huangs
2017/03/21 15:35:48
https://msdn.microsoft.com/library/windows/desktop
grt (UTC plus 2)
2017/03/22 08:03:36
tests added
|
| + |
| + // The ProgID description must not be empty. |
| + ASSERT_THAT(mode.prog_id_description, StrNe(L"")); |
| + |
| // UNSUPPORTED and kUseGoogleUpdateIntegration are mutually exclusive. |
| if (kUseGoogleUpdateIntegration) |
| ASSERT_THAT(mode.channel_strategy, Ne(ChannelStrategy::UNSUPPORTED)); |