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

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

Issue 17261014: Add support to Google Update wrappers for the "automatic updates only" group policy setting. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 7 years, 6 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/google_update_settings.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/installer/util/google_update_settings_unittest.cc
===================================================================
--- chrome/installer/util/google_update_settings_unittest.cc (revision 205261)
+++ chrome/installer/util/google_update_settings_unittest.cc (working copy)
@@ -544,12 +544,22 @@
&is_overridden));
EXPECT_FALSE(is_overridden);
- // The default policy should be in force for bogus values.
EXPECT_EQ(ERROR_SUCCESS,
RegKey(HKEY_LOCAL_MACHINE, kGoogleUpdatePoliciesKey,
KEY_SET_VALUE).WriteValue(kGoogleUpdateUpdateDefault,
static_cast<DWORD>(3)));
is_overridden = true;
+ EXPECT_EQ(GoogleUpdateSettings::AUTO_UPDATES_ONLY,
+ GoogleUpdateSettings::GetAppUpdatePolicy(kTestProductGuid,
+ &is_overridden));
+ EXPECT_FALSE(is_overridden);
+
+ // The default policy should be in force for bogus values.
+ EXPECT_EQ(ERROR_SUCCESS,
+ RegKey(HKEY_LOCAL_MACHINE, kGoogleUpdatePoliciesKey,
+ KEY_SET_VALUE).WriteValue(kGoogleUpdateUpdateDefault,
+ static_cast<DWORD>(4)));
+ is_overridden = true;
EXPECT_EQ(kDefaultUpdatePolicy,
GoogleUpdateSettings::GetAppUpdatePolicy(kTestProductGuid,
&is_overridden));
@@ -599,11 +609,21 @@
&is_overridden));
EXPECT_TRUE(is_overridden);
+ EXPECT_EQ(ERROR_SUCCESS,
+ RegKey(HKEY_LOCAL_MACHINE, kGoogleUpdatePoliciesKey,
+ KEY_SET_VALUE).WriteValue(app_policy_value.c_str(),
+ static_cast<DWORD>(3)));
+ is_overridden = false;
+ EXPECT_EQ(GoogleUpdateSettings::AUTO_UPDATES_ONLY,
+ GoogleUpdateSettings::GetAppUpdatePolicy(kTestProductGuid,
+ &is_overridden));
+ EXPECT_TRUE(is_overridden);
+
// The default policy should be in force for bogus values.
EXPECT_EQ(ERROR_SUCCESS,
RegKey(HKEY_LOCAL_MACHINE, kGoogleUpdatePoliciesKey,
KEY_SET_VALUE).WriteValue(app_policy_value.c_str(),
- static_cast<DWORD>(3)));
+ static_cast<DWORD>(4)));
is_overridden = true;
EXPECT_EQ(GoogleUpdateSettings::UPDATES_DISABLED,
GoogleUpdateSettings::GetAppUpdatePolicy(kTestProductGuid,
« no previous file with comments | « chrome/installer/util/google_update_settings.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698