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

Unified Diff: chrome/install_static/install_modes_unittest.cc

Issue 2764963002: Move ProgID methods from BrowserDistribution into install_static. (Closed)
Patch Set: Created 3 years, 9 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
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));

Powered by Google App Engine
This is Rietveld 408576698