| 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..61d27f38c5baf94ef65987f291af1fff9a4ebb36 100644
|
| --- a/chrome/installer/setup/setup_util_unittest.cc
|
| +++ b/chrome/installer/setup/setup_util_unittest.cc
|
| @@ -193,6 +193,39 @@ TEST(SetupUtilTest, GuidToSquid) {
|
| L"3E026ADE89AA64838BE14339BCE2E020");
|
| }
|
|
|
| +TEST(SetupUtilTest, RegisterEventLogProvider) {
|
| + registry_util::RegistryOverrideManager registry_override_manager;
|
| + registry_override_manager.OverrideRegistry(HKEY_LOCAL_MACHINE);
|
| +
|
| + const base::Version version("1.2.3.4");
|
| + const base::FilePath install_directory(
|
| + FILE_PATH_LITERAL("c:\\some_path\\test"));
|
| + installer::RegisterEventLogProvider(install_directory, version);
|
| +
|
| + base::win::RegKey key;
|
| + static constexpr wchar_t kRegistryLocation[] =
|
| + L"SYSTEM\\CurrentControlSet\\Services\\EventLog\\Application\\chrome";
|
| + ASSERT_EQ(ERROR_SUCCESS,
|
| + key.Open(HKEY_LOCAL_MACHINE, kRegistryLocation, KEY_READ));
|
| + EXPECT_TRUE(key.HasValue(L"CategoryCount"));
|
| + EXPECT_TRUE(key.HasValue(L"TypesSupported"));
|
| + EXPECT_TRUE(key.HasValue(L"CategoryMessageFile"));
|
| + EXPECT_TRUE(key.HasValue(L"EventMessageFile"));
|
| + EXPECT_TRUE(key.HasValue(L"ParameterMessageFile"));
|
| + base::string16 value;
|
| + EXPECT_EQ(ERROR_SUCCESS, key.ReadValue(L"CategoryMessageFile", &value));
|
| + const base::FilePath expected_directory(
|
| + install_directory.AppendASCII(version.GetString()));
|
| + const base::FilePath provider_path(value);
|
| + EXPECT_EQ(expected_directory, provider_path.DirName());
|
| + key.Close();
|
| +
|
| + installer::DeRegisterEventLogProvider();
|
| +
|
| + EXPECT_NE(ERROR_SUCCESS,
|
| + key.Open(HKEY_LOCAL_MACHINE, kRegistryLocation, KEY_READ));
|
| +}
|
| +
|
| const char kAdjustProcessPriority[] = "adjust-process-priority";
|
|
|
| PriorityClassChangeResult DoProcessPriorityAdjustment() {
|
|
|