Chromium Code Reviews| 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()); |
| } |