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

Unified Diff: chrome/browser/policy/device_policy_cache_unittest.cc

Issue 7014036: Split the policy refresh rate preference into user- and device-policy refresh rate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 9 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/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/profile_policy_connector.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/policy/device_policy_cache_unittest.cc
diff --git a/chrome/browser/policy/device_policy_cache_unittest.cc b/chrome/browser/policy/device_policy_cache_unittest.cc
index e5ded55f5ba9f49193138146afc5289004861fc1..655e0f3749af80fd15b1c3854292ef6923368b22 100644
--- a/chrome/browser/policy/device_policy_cache_unittest.cc
+++ b/chrome/browser/policy/device_policy_cache_unittest.cc
@@ -64,7 +64,8 @@ void CreateRefreshRatePolicy(em::PolicyFetchResponse* policy,
// timestamp, machine_name, policy_type, public key info.
em::PolicyData signed_response;
em::ChromeDeviceSettingsProto settings;
- settings.mutable_policy_refresh_rate()->set_policy_refresh_rate(refresh_rate);
+ settings.mutable_device_policy_refresh_rate()->
+ set_device_policy_refresh_rate(refresh_rate);
signed_response.set_username(user);
signed_response.set_request_token("dmtoken");
signed_response.set_device_id("deviceid");
@@ -151,7 +152,8 @@ TEST_F(DevicePolicyCacheTest, Startup) {
testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_);
FundamentalValue expected(120);
EXPECT_TRUE(Value::Equals(&expected,
- GetMandatoryPolicy(kPolicyPolicyRefreshRate)));
+ GetMandatoryPolicy(
+ kPolicyDevicePolicyRefreshRate)));
}
TEST_F(DevicePolicyCacheTest, SetPolicy) {
@@ -169,7 +171,8 @@ TEST_F(DevicePolicyCacheTest, SetPolicy) {
testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_);
FundamentalValue expected(120);
EXPECT_TRUE(Value::Equals(&expected,
- GetMandatoryPolicy(kPolicyPolicyRefreshRate)));
+ GetMandatoryPolicy(
+ kPolicyDevicePolicyRefreshRate)));
// Set new policy information.
em::PolicyFetchResponse new_policy;
@@ -183,7 +186,8 @@ TEST_F(DevicePolicyCacheTest, SetPolicy) {
testing::Mock::VerifyAndClearExpectations(&signed_settings_helper_);
FundamentalValue updated_expected(300);
EXPECT_TRUE(Value::Equals(&updated_expected,
- GetMandatoryPolicy(kPolicyPolicyRefreshRate)));
+ GetMandatoryPolicy(
+ kPolicyDevicePolicyRefreshRate)));
}
TEST_F(DevicePolicyCacheTest, SetPolicyWrongUser) {
@@ -209,7 +213,8 @@ TEST_F(DevicePolicyCacheTest, SetPolicyWrongUser) {
FundamentalValue expected(120);
EXPECT_TRUE(Value::Equals(&expected,
- GetMandatoryPolicy(kPolicyPolicyRefreshRate)));
+ GetMandatoryPolicy(
+ kPolicyDevicePolicyRefreshRate)));
}
TEST_F(DevicePolicyCacheTest, SetPolicyNonEnterpriseDevice) {
@@ -233,7 +238,8 @@ TEST_F(DevicePolicyCacheTest, SetPolicyNonEnterpriseDevice) {
FundamentalValue expected(120);
EXPECT_TRUE(Value::Equals(&expected,
- GetMandatoryPolicy(kPolicyPolicyRefreshRate)));
+ GetMandatoryPolicy(
+ kPolicyDevicePolicyRefreshRate)));
}
TEST_F(DevicePolicyCacheTest, SetProxyPolicy) {
« no previous file with comments | « chrome/browser/policy/device_policy_cache.cc ('k') | chrome/browser/policy/profile_policy_connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698