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

Unified Diff: chrome/install_static/install_util_unittest.cc

Issue 2718063002: Use install_static::GetAppGuid in place of BrowserDistribution and AppRegistrationData. (Closed)
Patch Set: Chromium compile fix 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_util.cc ('k') | chrome/installer/util/app_registration_data.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/install_static/install_util_unittest.cc
diff --git a/chrome/install_static/install_util_unittest.cc b/chrome/install_static/install_util_unittest.cc
index 8e8f7b9ffe490e0e583c4e2316c6a0977be2d51f..bac26ad73e99bf5f19460022f3467544263074df 100644
--- a/chrome/install_static/install_util_unittest.cc
+++ b/chrome/install_static/install_util_unittest.cc
@@ -6,6 +6,7 @@
#include <tuple>
+#include "base/macros.h"
#include "base/memory/ptr_util.h"
#include "base/test/test_reg_util_win.h"
#include "chrome/install_static/install_details.h"
@@ -341,6 +342,26 @@ class InstallStaticUtilTest
DISALLOW_COPY_AND_ASSIGN(InstallStaticUtilTest);
};
+TEST_P(InstallStaticUtilTest, GetAppGuid) {
+ // For brands that do not integrate with Omaha/Google Update, the app guid is
+ // an empty string.
+ if (!kUseGoogleUpdateIntegration)
+ EXPECT_STREQ(L"", GetAppGuid());
+
+#if defined(GOOGLE_CHROME_BUILD)
+ // The app guids for the brand's install modes; parallel to kInstalLModes.
+ static constexpr const wchar_t* kAppGuids[] = {
+ L"{8A69D345-D564-463c-AFF1-A69D9E530F96}", // Google Chrome.
+ L"{4ea16ac7-fd5a-47c3-875b-dbf4a2008c20}", // Google Chrome SxS (canary).
huangs 2017/02/27 16:15:14 NIT: Capitalize "Canary"? I find it odd that the
grt (UTC plus 2) 2017/02/27 20:53:01 Done.
+ };
+ static_assert(arraysize(kAppGuids) == NUM_INSTALL_MODES,
+ "kAppGuids out of date.");
+ EXPECT_STREQ(kAppGuids[std::get<0>(GetParam())], GetAppGuid());
+#else
+ FAIL() << "Not implemented.";
huangs 2017/02/27 16:15:14 So Chromium test will fail? And if the parameteri
grt (UTC plus 2) 2017/02/27 20:53:01 I'd meant for the test to exit just after line 349
+#endif
+}
+
TEST_P(InstallStaticUtilTest, UsageStatsAbsent) {
EXPECT_FALSE(GetCollectStatsConsent());
}
« no previous file with comments | « chrome/install_static/install_util.cc ('k') | chrome/installer/util/app_registration_data.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698