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() { |