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

Unified Diff: chrome/installer/util/installation_validator_unittest.cc

Issue 12035043: Implementing app command to query EULA acceptance state for Chrome. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Style and string fixes. Created 7 years, 11 months 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
« no previous file with comments | « chrome/installer/util/installation_validator.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/installation_validator_unittest.cc
diff --git a/chrome/installer/util/installation_validator_unittest.cc b/chrome/installer/util/installation_validator_unittest.cc
index 5b2b4eb11fd4d9175eb3da6ce164e20ef376f072..9f988da8e236beedefe6a483cfeac588e58aa40a 100644
--- a/chrome/installer/util/installation_validator_unittest.cc
+++ b/chrome/installer/util/installation_validator_unittest.cc
@@ -90,6 +90,10 @@ class FakeProductState : public ProductState {
Level install_level,
const char* version,
int channel_modifiers);
+ void AddQueryEULAAcceptanceCommand(BrowserDistribution::Type dist_type,
+ Level install_level,
+ const char* version,
+ int channel_modifiers);
void set_multi_install(bool is_multi_install) {
multi_install_ = is_multi_install;
}
@@ -266,6 +270,25 @@ void FakeProductState::AddOsUpgradeCommand(BrowserDistribution::Type dist_type,
commands_.Set(installer::kCmdOnOsUpgrade, app_cmd);
}
+// Adds the "query-eula-acceptance" Google Update product command.
+void FakeProductState::AddQueryEULAAcceptanceCommand(
+ BrowserDistribution::Type dist_type,
+ Level install_level,
+ const char* version,
+ int channel_modifiers) {
+ DCHECK_EQ(dist_type, BrowserDistribution::CHROME_BINARIES);
+
+ CommandLine cmd_line(GetSetupExePath(dist_type, install_level, version,
+ channel_modifiers));
+ cmd_line.AppendSwitch(installer::switches::kQueryEULAAcceptance);
+ if (install_level == SYSTEM_LEVEL)
+ cmd_line.AppendSwitch(installer::switches::kSystemLevel);
+ cmd_line.AppendSwitch(installer::switches::kVerboseLogging);
+ AppCommand app_cmd(cmd_line.GetCommandLineString());
+ app_cmd.set_is_web_accessible(true);
+ commands_.Set(installer::kCmdQueryEULAAcceptance, app_cmd);
+}
+
} // namespace
// Fixture for testing the InstallationValidator. Errors logged by the
@@ -450,12 +473,17 @@ void InstallationValidatorTest::MakeProductState(
state->SetUninstallCommand(prod_type, install_level, chrome::kChromeVersion,
channel_modifiers, vehicle);
state->set_multi_install(is_multi_install);
- if (prod_type == BrowserDistribution::CHROME_BINARIES &&
- (inst_type == InstallationValidator::CHROME_MULTI ||
- inst_type ==
- InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI)) {
- state->AddQuickEnableCfCommand(prod_type, install_level,
- chrome::kChromeVersion, channel_modifiers);
+ if (prod_type == BrowserDistribution::CHROME_BINARIES) {
+ if (inst_type == InstallationValidator::CHROME_MULTI ||
+ inst_type ==
+ InstallationValidator::CHROME_FRAME_READY_MODE_CHROME_MULTI) {
+ state->AddQuickEnableCfCommand(prod_type, install_level,
+ chrome::kChromeVersion, channel_modifiers);
+ }
+ state->AddQueryEULAAcceptanceCommand(prod_type,
+ install_level,
+ chrome::kChromeVersion,
+ channel_modifiers);
}
if (prod_type == BrowserDistribution::CHROME_BINARIES) {
state->AddQuickEnableApplicationHostCommand(prod_type,
« no previous file with comments | « chrome/installer/util/installation_validator.cc ('k') | chrome/installer/util/util_constants.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698