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

Unified Diff: chrome/installer/setup/setup_util_unittest.cc

Issue 2507753002: Install the chrome event log provider together with the browser. (Closed)
Patch Set: Fix wrong append call. Created 4 years, 1 month 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/installer/setup/setup_util_unittest.cc
diff --git a/chrome/installer/setup/setup_util_unittest.cc b/chrome/installer/setup/setup_util_unittest.cc
index eb62820e9c71c82078096257e982472c3b92cf5e..194752182561ad0f707204713d9bec7f91ff34d8 100644
--- a/chrome/installer/setup/setup_util_unittest.cc
+++ b/chrome/installer/setup/setup_util_unittest.cc
@@ -193,6 +193,32 @@ TEST(SetupUtilTest, GuidToSquid) {
L"3E026ADE89AA64838BE14339BCE2E020");
}
+TEST(SetupUtilTest, RegisterEventLogProvider) {
+ registry_util::RegistryOverrideManager registry_override_manager;
+ registry_override_manager.OverrideRegistry(HKEY_LOCAL_MACHINE);
+
+ base::FilePath install_directory(FILE_PATH_LITERAL("c:\\some_path\\test"));
+ installer::RegisterEventLogProvider(install_directory);
+
+ base::win::RegKey key;
+ constexpr wchar_t registry_location[] =
grt (UTC plus 2) 2016/11/22 10:41:25 nit: static constexpr wchar_t kRegistryLocation[]
pastarmovj 2016/11/23 14:27:26 Done.
+ L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\chrome";
+ ASSERT_EQ(ERROR_SUCCESS,
+ key.Open(HKEY_LOCAL_MACHINE, registry_location, KEY_READ));
+ ASSERT_TRUE(key.HasValue(L"CategoryCount"));
grt (UTC plus 2) 2016/11/22 10:41:25 nit: make these all EXPECT_TRUE so that the test w
pastarmovj 2016/11/23 14:27:26 Done. Fell in the copy/paste trap here :)
+ ASSERT_TRUE(key.HasValue(L"TypesSupported"));
+ ASSERT_TRUE(key.HasValue(L"CategoryMessageFile"));
+ ASSERT_TRUE(key.HasValue(L"EventMessageFile"));
+ ASSERT_TRUE(key.HasValue(L"ParameterMessageFile"));
+ key.Close();
+
+ installer::DeRegisterEventLogProvider();
+
+ ASSERT_NE(ERROR_SUCCESS,
grt (UTC plus 2) 2016/11/22 10:41:25 this could be EXPECT_NE as well
pastarmovj 2016/11/23 14:27:26 Done.
+ key.Open(HKEY_LOCAL_MACHINE, registry_location, KEY_READ));
+}
+
+
const char kAdjustProcessPriority[] = "adjust-process-priority";
PriorityClassChangeResult DoProcessPriorityAdjustment() {

Powered by Google App Engine
This is Rietveld 408576698