Commit 61074282 authored by Greg Thompson's avatar Greg Thompson Committed by Commit Bot

Fix LegacyCleanupsTest failures following r742559.

BUG=1054342
R=bcwhite@chromium.org

Change-Id: Icb07c344efbef1592730dce1ca40bc0079e378e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2066542
Auto-Submit: Greg Thompson <grt@chromium.org>
Commit-Queue: Brian White <bcwhite@chromium.org>
Reviewed-by: default avatarBrian White <bcwhite@chromium.org>
Cr-Commit-Position: refs/heads/master@{#743167}
parent f977c096
...@@ -676,13 +676,9 @@ class LegacyCleanupsTest : public ::testing::Test { ...@@ -676,13 +676,9 @@ class LegacyCleanupsTest : public ::testing::Test {
KEY_WRITE) KEY_WRITE)
.Valid()); .Valid());
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
ASSERT_TRUE(base::win::RegKey(HKEY_CURRENT_USER, kGCFClientsKeyPath,
KEY_WRITE | KEY_WOW64_32KEY)
.Valid());
ASSERT_TRUE(base::win::RegKey(HKEY_CURRENT_USER, kAppLauncherClientsKeyPath, ASSERT_TRUE(base::win::RegKey(HKEY_CURRENT_USER, kAppLauncherClientsKeyPath,
KEY_WRITE | KEY_WOW64_32KEY) KEY_WRITE | KEY_WOW64_32KEY)
.Valid()); .Valid());
ASSERT_GT(base::WriteFile(GetAppHostExePath(), "cha", 3), 0);
ASSERT_TRUE( ASSERT_TRUE(
base::win::RegKey(HKEY_CURRENT_USER, base::win::RegKey(HKEY_CURRENT_USER,
GetChromeAppCommandPath(L"install-extension").c_str(), GetChromeAppCommandPath(L"install-extension").c_str(),
...@@ -706,20 +702,12 @@ class LegacyCleanupsTest : public ::testing::Test { ...@@ -706,20 +702,12 @@ class LegacyCleanupsTest : public ::testing::Test {
} }
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
bool HasMultiGCFVersionKey() const {
return base::win::RegKey(HKEY_CURRENT_USER, kGCFClientsKeyPath,
KEY_QUERY_VALUE | KEY_WOW64_32KEY)
.Valid();
}
bool HasAppLauncherVersionKey() const { bool HasAppLauncherVersionKey() const {
return base::win::RegKey(HKEY_CURRENT_USER, kAppLauncherClientsKeyPath, return base::win::RegKey(HKEY_CURRENT_USER, kAppLauncherClientsKeyPath,
KEY_QUERY_VALUE | KEY_WOW64_32KEY) KEY_QUERY_VALUE | KEY_WOW64_32KEY)
.Valid(); .Valid();
} }
bool HasAppHostExe() const { return base::PathExists(GetAppHostExePath()); }
bool HasInstallExtensionCommand() const { bool HasInstallExtensionCommand() const {
return base::win::RegKey( return base::win::RegKey(
HKEY_CURRENT_USER, HKEY_CURRENT_USER,
...@@ -743,10 +731,6 @@ class LegacyCleanupsTest : public ::testing::Test { ...@@ -743,10 +731,6 @@ class LegacyCleanupsTest : public ::testing::Test {
}; };
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
base::FilePath GetAppHostExePath() const {
return installer_state_->target_path().AppendASCII("app_host.exe");
}
base::string16 GetChromeAppCommandPath(const wchar_t* command) const { base::string16 GetChromeAppCommandPath(const wchar_t* command) const {
return base::string16( return base::string16(
L"SOFTWARE\\Google\\Update\\Clients\\" L"SOFTWARE\\Google\\Update\\Clients\\"
...@@ -758,7 +742,6 @@ class LegacyCleanupsTest : public ::testing::Test { ...@@ -758,7 +742,6 @@ class LegacyCleanupsTest : public ::testing::Test {
static const wchar_t kBinariesClientsKeyPath[]; static const wchar_t kBinariesClientsKeyPath[];
static const wchar_t kCommandExecuteImplClsid[]; static const wchar_t kCommandExecuteImplClsid[];
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
static const wchar_t kGCFClientsKeyPath[];
static const wchar_t kAppLauncherClientsKeyPath[]; static const wchar_t kAppLauncherClientsKeyPath[];
#endif #endif
...@@ -774,9 +757,6 @@ const wchar_t LegacyCleanupsTest::kBinariesClientsKeyPath[] = ...@@ -774,9 +757,6 @@ const wchar_t LegacyCleanupsTest::kBinariesClientsKeyPath[] =
L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}"; L"{4DC8B4CA-1BDA-483e-B5FA-D3C12E15B62D}";
const wchar_t LegacyCleanupsTest::kCommandExecuteImplClsid[] = const wchar_t LegacyCleanupsTest::kCommandExecuteImplClsid[] =
L"Software\\Classes\\CLSID\\{5C65F4B0-3651-4514-B207-D10CB699B14B}"; L"Software\\Classes\\CLSID\\{5C65F4B0-3651-4514-B207-D10CB699B14B}";
const wchar_t LegacyCleanupsTest::kGCFClientsKeyPath[] =
L"SOFTWARE\\Google\\Update\\Clients\\"
L"{8BA986DA-5100-405E-AA35-86F34A02ACBF}";
const wchar_t LegacyCleanupsTest::kAppLauncherClientsKeyPath[] = const wchar_t LegacyCleanupsTest::kAppLauncherClientsKeyPath[] =
L"SOFTWARE\\Google\\Update\\Clients\\" L"SOFTWARE\\Google\\Update\\Clients\\"
L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}"; L"{FDA71E6F-AC4C-4a00-8B70-9958A68906BF}";
...@@ -792,9 +772,7 @@ TEST_F(LegacyCleanupsTest, NoOpOnFailedUpdate) { ...@@ -792,9 +772,7 @@ TEST_F(LegacyCleanupsTest, NoOpOnFailedUpdate) {
EXPECT_TRUE(HasBinariesVersionKey()); EXPECT_TRUE(HasBinariesVersionKey());
EXPECT_TRUE(HasCommandExecuteImplClassKey()); EXPECT_TRUE(HasCommandExecuteImplClassKey());
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
EXPECT_TRUE(HasMultiGCFVersionKey());
EXPECT_TRUE(HasAppLauncherVersionKey()); EXPECT_TRUE(HasAppLauncherVersionKey());
EXPECT_TRUE(HasAppHostExe());
EXPECT_TRUE(HasInstallExtensionCommand()); EXPECT_TRUE(HasInstallExtensionCommand());
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
} }
...@@ -804,9 +782,7 @@ TEST_F(LegacyCleanupsTest, Do) { ...@@ -804,9 +782,7 @@ TEST_F(LegacyCleanupsTest, Do) {
EXPECT_FALSE(HasBinariesVersionKey()); EXPECT_FALSE(HasBinariesVersionKey());
EXPECT_FALSE(HasCommandExecuteImplClassKey()); EXPECT_FALSE(HasCommandExecuteImplClassKey());
#if BUILDFLAG(GOOGLE_CHROME_BRANDING) #if BUILDFLAG(GOOGLE_CHROME_BRANDING)
EXPECT_FALSE(HasMultiGCFVersionKey());
EXPECT_FALSE(HasAppLauncherVersionKey()); EXPECT_FALSE(HasAppLauncherVersionKey());
EXPECT_FALSE(HasAppHostExe());
EXPECT_FALSE(HasInstallExtensionCommand()); EXPECT_FALSE(HasInstallExtensionCommand());
#endif // BUILDFLAG(GOOGLE_CHROME_BRANDING) #endif // BUILDFLAG(GOOGLE_CHROME_BRANDING)
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment