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

Side by Side Diff: chrome/browser/policy/configuration_policy_provider_mac_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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include <gtest/gtest.h> 5 #include <gtest/gtest.h>
6 6
7 #include "base/mac/scoped_cftyperef.h" 7 #include "base/mac/scoped_cftyperef.h"
8 #include "base/stl_util.h" 8 #include "base/stl_util.h"
9 #include "base/sys_string_conversions.h" 9 #include "base/sys_string_conversions.h"
10 #include "chrome/browser/policy/configuration_policy_pref_store.h" 10 #include "chrome/browser/policy/configuration_policy_pref_store.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 } 91 }
92 default: 92 default:
93 return NULL; 93 return NULL;
94 } 94 }
95 } 95 }
96 96
97 // Factory methods that create parameter objects for different value types. 97 // Factory methods that create parameter objects for different value types.
98 static PolicyTestParams ForStringPolicy( 98 static PolicyTestParams ForStringPolicy(
99 ConfigurationPolicyType type, 99 ConfigurationPolicyType type,
100 const char* name) { 100 const char* name) {
101 return PolicyTestParams(type, name, Value::CreateStringValue("test")); 101 return PolicyTestParams(type, name, base::StringValue::New("test"));
102 } 102 }
103 static PolicyTestParams ForBooleanPolicy( 103 static PolicyTestParams ForBooleanPolicy(
104 ConfigurationPolicyType type, 104 ConfigurationPolicyType type,
105 const char* name) { 105 const char* name) {
106 return PolicyTestParams(type, name, Value::CreateBooleanValue(true)); 106 return PolicyTestParams(type, name, base::TrueValue());
107 } 107 }
108 static PolicyTestParams ForIntegerPolicy( 108 static PolicyTestParams ForIntegerPolicy(
109 ConfigurationPolicyType type, 109 ConfigurationPolicyType type,
110 const char* name) { 110 const char* name) {
111 return PolicyTestParams(type, name, Value::CreateIntegerValue(42)); 111 return PolicyTestParams(type, name, base::NumberValue::New(42));
112 } 112 }
113 static PolicyTestParams ForListPolicy( 113 static PolicyTestParams ForListPolicy(
114 ConfigurationPolicyType type, 114 ConfigurationPolicyType type,
115 const char* name) { 115 const char* name) {
116 ListValue* value = new ListValue; 116 ListValue* value = new ListValue;
117 value->Set(0U, Value::CreateStringValue("first")); 117 value->Set(0U, base::StringValue::New("first"));
118 value->Set(1U, Value::CreateStringValue("second")); 118 value->Set(1U, base::StringValue::New("second"));
119 return PolicyTestParams(type, name, value); 119 return PolicyTestParams(type, name, value);
120 } 120 }
121 121
122 private: 122 private:
123 ConfigurationPolicyType type_; 123 ConfigurationPolicyType type_;
124 const char* policy_name_; 124 const char* policy_name_;
125 scoped_ptr<Value> test_value_; 125 scoped_ptr<Value> test_value_;
126 }; 126 };
127 127
128 // Parametrized test class for testing whether ConfigurationPolicyProviderMac 128 // Parametrized test class for testing whether ConfigurationPolicyProviderMac
(...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 kPolicyDisabledSchemes, 344 kPolicyDisabledSchemes,
345 key::kDisabledSchemes), 345 key::kDisabledSchemes),
346 PolicyTestParams::ForStringPolicy( 346 PolicyTestParams::ForStringPolicy(
347 kPolicyDiskCacheDir, 347 kPolicyDiskCacheDir,
348 key::kDiskCacheDir), 348 key::kDiskCacheDir),
349 PolicyTestParams::ForIntegerPolicy( 349 PolicyTestParams::ForIntegerPolicy(
350 kPolicyMaxConnectionsPerProxy, 350 kPolicyMaxConnectionsPerProxy,
351 key::kMaxConnectionsPerProxy))); 351 key::kMaxConnectionsPerProxy)));
352 352
353 } // namespace policy 353 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698