| Index: chrome/installer/util/install_util_unittest.cc
|
| ===================================================================
|
| --- chrome/installer/util/install_util_unittest.cc (revision 85625)
|
| +++ chrome/installer/util/install_util_unittest.cc (working copy)
|
| @@ -7,19 +7,12 @@
|
|
|
| #include "base/command_line.h"
|
| #include "base/win/registry.h"
|
| -#include "chrome/installer/util/browser_distribution.h"
|
| #include "chrome/installer/util/google_update_constants.h"
|
| -#include "chrome/installer/util/installation_state.h"
|
| -#include "chrome/installer/util/installer_state.h"
|
| #include "chrome/installer/util/install_util.h"
|
| -#include "chrome/installer/util/master_preferences.h"
|
| #include "chrome/installer/util/product_unittest.h"
|
| #include "testing/gmock/include/gmock/gmock.h"
|
|
|
| using base::win::RegKey;
|
| -using installer::InstallationState;
|
| -using installer::InstallerState;
|
| -using installer::MasterPreferences;
|
| using ::testing::_;
|
| using ::testing::Return;
|
| using ::testing::StrEq;
|
| @@ -33,62 +26,6 @@
|
| protected:
|
| };
|
|
|
| -TEST_F(InstallUtilTest, InstallerResult) {
|
| - const bool system_level = true;
|
| - bool multi_install = false;
|
| - HKEY root = system_level ? HKEY_LOCAL_MACHINE : HKEY_CURRENT_USER;
|
| -
|
| - RegKey key;
|
| - std::wstring launch_cmd = L"hey diddle diddle";
|
| - std::wstring value;
|
| -
|
| - // check results for a fresh install of single Chrome
|
| - {
|
| - TempRegKeyOverride override(root, L"root_inst_res");
|
| - CommandLine cmd_line = CommandLine::FromString(L"setup.exe --system-level");
|
| - const MasterPreferences prefs(cmd_line);
|
| - InstallationState machine_state;
|
| - machine_state.Initialize();
|
| - InstallerState state;
|
| - state.Initialize(cmd_line, prefs, machine_state);
|
| - InstallUtil::WriteInstallerResult(system_level, state.state_key(),
|
| - installer::FIRST_INSTALL_SUCCESS, 0, &launch_cmd);
|
| - BrowserDistribution* distribution =
|
| - BrowserDistribution::GetSpecificDistribution(
|
| - BrowserDistribution::CHROME_BROWSER);
|
| - EXPECT_EQ(ERROR_SUCCESS,
|
| - key.Open(root, distribution->GetStateKey().c_str(), KEY_READ));
|
| - EXPECT_EQ(ERROR_SUCCESS,
|
| - key.ReadValue(installer::kInstallerSuccessLaunchCmdLine, &value));
|
| - EXPECT_EQ(launch_cmd, value);
|
| - }
|
| - TempRegKeyOverride::DeleteAllTempKeys();
|
| -
|
| - // check results for a fresh install of multi Chrome
|
| - {
|
| - TempRegKeyOverride override(root, L"root_inst_res");
|
| - CommandLine cmd_line = CommandLine::FromString(
|
| - L"setup.exe --system-level --multi-install --chrome");
|
| - const MasterPreferences prefs(cmd_line);
|
| - InstallationState machine_state;
|
| - machine_state.Initialize();
|
| - InstallerState state;
|
| - state.Initialize(cmd_line, prefs, machine_state);
|
| - InstallUtil::WriteInstallerResult(system_level, state.state_key(),
|
| - installer::FIRST_INSTALL_SUCCESS, 0, &launch_cmd);
|
| - BrowserDistribution* distribution =
|
| - BrowserDistribution::GetSpecificDistribution(
|
| - BrowserDistribution::CHROME_BROWSER);
|
| - EXPECT_EQ(ERROR_SUCCESS,
|
| - key.Open(root, distribution->GetStateKey().c_str(), KEY_READ));
|
| - EXPECT_EQ(ERROR_SUCCESS,
|
| - key.ReadValue(installer::kInstallerSuccessLaunchCmdLine, &value));
|
| - EXPECT_EQ(launch_cmd, value);
|
| - key.Close();
|
| - }
|
| - TempRegKeyOverride::DeleteAllTempKeys();
|
| -}
|
| -
|
| TEST_F(InstallUtilTest, MakeUninstallCommand) {
|
| CommandLine command_line(CommandLine::NO_PROGRAM);
|
|
|
|
|