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

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

Issue 7649006: more changes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix another typo Created 9 years, 4 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
Index: chrome/browser/policy/cloud_policy_provider_unittest.cc
diff --git a/chrome/browser/policy/cloud_policy_provider_unittest.cc b/chrome/browser/policy/cloud_policy_provider_unittest.cc
index f8f8768c1c2ab5a1abb3abd619ad3716d1dab31d..0ef9dba1b3774e012005514b7d3cb1ad57e74a33 100644
--- a/chrome/browser/policy/cloud_policy_provider_unittest.cc
+++ b/chrome/browser/policy/cloud_policy_provider_unittest.cc
@@ -128,28 +128,28 @@ TEST_F(CloudPolicyProviderTest,
// Prepare |cache[0]| to serve some non-proxy policies.
caches[0].raw_mandatory_policy()->Set(kPolicyShowHomeButton,
- Value::CreateBooleanValue(true));
+ base::TrueValue());
caches[0].raw_mandatory_policy()->Set(kPolicyIncognitoEnabled,
- Value::CreateBooleanValue(true));
+ base::TrueValue());
caches[0].raw_mandatory_policy()->Set(kPolicyTranslateEnabled,
- Value::CreateBooleanValue(true));
+ base::TrueValue());
caches[0].set_initialized(true);
// Prepare the other caches to serve one proxy-policy each.
caches[1].raw_mandatory_policy()->Set(kPolicyProxyMode,
- Value::CreateStringValue("cache 1"));
+ base::StringValue::New("cache 1"));
caches[1].set_initialized(true);
caches[2].raw_mandatory_policy()->Set(kPolicyProxyServerMode,
- Value::CreateIntegerValue(2));
+ base::NumberValue::New(2));
caches[2].set_initialized(true);
caches[3].raw_mandatory_policy()->Set(kPolicyProxyServer,
- Value::CreateStringValue("cache 3"));
+ base::StringValue::New("cache 3"));
caches[3].set_initialized(true);
caches[4].raw_mandatory_policy()->Set(kPolicyProxyPacUrl,
- Value::CreateStringValue("cache 4"));
+ base::StringValue::New("cache 4"));
caches[4].set_initialized(true);
caches[5].raw_mandatory_policy()->Set(kPolicyProxyMode,
- Value::CreateStringValue("cache 5"));
+ base::StringValue::New("cache 5"));
caches[5].set_initialized(true);
RunCachesThroughProvider(
@@ -170,13 +170,13 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsSame) {
PolicyMap A, B, C;
CreateCloudPolicyProvider(CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED);
A.Set(kPolicyHomepageLocation,
- Value::CreateStringValue("http://www.chromium.org"));
+ base::StringValue::New("http://www.chromium.org"));
B.Set(kPolicyHomepageLocation,
- Value::CreateStringValue("http://www.google.com"));
- A.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("hu"));
- B.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("us"));
- A.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(100));
- B.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(200));
+ base::StringValue::New("http://www.google.com"));
+ A.Set(kPolicyApplicationLocaleValue, base::StringValue::New("hu"));
+ B.Set(kPolicyApplicationLocaleValue, base::StringValue::New("us"));
+ A.Set(kPolicyDevicePolicyRefreshRate, base::NumberValue::New(100));
+ B.Set(kPolicyDevicePolicyRefreshRate, base::NumberValue::New(200));
CombineTwoPolicyMaps(A, B, &C);
EXPECT_TRUE(A.Equals(C));
}
@@ -193,12 +193,12 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsPartial) {
CreateCloudPolicyProvider(CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED);
A.Set(kPolicyHomepageLocation,
- Value::CreateStringValue("http://www.chromium.org"));
+ base::StringValue::New("http://www.chromium.org"));
B.Set(kPolicyHomepageLocation,
- Value::CreateStringValue("http://www.google.com"));
- B.Set(kPolicyApplicationLocaleValue, Value::CreateStringValue("us"));
- A.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(100));
- B.Set(kPolicyDevicePolicyRefreshRate, new base::FundamentalValue(200));
+ base::StringValue::New("http://www.google.com"));
+ B.Set(kPolicyApplicationLocaleValue, base::StringValue::New("us"));
+ A.Set(kPolicyDevicePolicyRefreshRate, base::NumberValue::New(100));
+ B.Set(kPolicyDevicePolicyRefreshRate, base::NumberValue::New(200));
CombineTwoPolicyMaps(A, B, &C);
const Value* value;
@@ -224,12 +224,12 @@ TEST_F(CloudPolicyProviderTest, CombineTwoPolicyMapsProxies) {
PolicyMap A, B, C;
CreateCloudPolicyProvider(CloudPolicyCacheBase::POLICY_LEVEL_RECOMMENDED);
- A.Set(policy::kPolicyProxyMode, Value::CreateIntegerValue(a_value));
+ A.Set(policy::kPolicyProxyMode, base::NumberValue::New(a_value));
- B.Set(policy::kPolicyProxyServerMode, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyServer, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyPacUrl, Value::CreateIntegerValue(b_value));
- B.Set(policy::kPolicyProxyBypassList, Value::CreateIntegerValue(b_value));
+ B.Set(policy::kPolicyProxyServerMode, base::NumberValue::New(b_value));
+ B.Set(policy::kPolicyProxyServer, base::NumberValue::New(b_value));
+ B.Set(policy::kPolicyProxyPacUrl, base::NumberValue::New(b_value));
+ B.Set(policy::kPolicyProxyBypassList, base::NumberValue::New(b_value));
CombineTwoPolicyMaps(A, B, &C);

Powered by Google App Engine
This is Rietveld 408576698