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

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

Issue 8258018: Generate Chrome policy definition list from policy_templates.json. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix the unittest fix Created 9 years, 2 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/configuration_policy_provider_win_unittest.cc
diff --git a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
index 20dd8ba5ef22723d61f89389551c09db7469c13c..7c04ffa2f42684d74f0bfdcbbe6ebb99d1ddcc6c 100644
--- a/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
+++ b/chrome/browser/policy/configuration_policy_provider_win_unittest.cc
@@ -193,7 +193,7 @@ void ConfigurationPolicyProviderWinTest::SetUp() {
ActivateOverrides();
provider_.reset(new ConfigurationPolicyProviderWin(
- ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList()));
+ GetChromePolicyDefinitionList()));
}
void ConfigurationPolicyProviderWinTest::TearDown() {
@@ -355,7 +355,9 @@ TEST_P(ConfigurationPolicyProviderWinTest, HKLMOverHKCU) {
EXPECT_TRUE(value->Equals(GetParam().hklm_value()));
}
-// Instantiate the test case for all supported policies.
+// Test parameters for all supported policies. testing::Values() has a limit of
+// 50 parameters which is reached in this instantiation; new policies should go
+// in the next instantiation after this one.
INSTANTIATE_TEST_CASE_P(
ConfigurationPolicyProviderWinTestInstance,
ConfigurationPolicyProviderWinTest,
@@ -459,9 +461,6 @@ INSTANTIATE_TEST_CASE_P(
PolicyTestParams::ForBooleanPolicy(
kPolicyPrintingEnabled,
key::kPrintingEnabled),
- PolicyTestParams::ForIntegerPolicy(
- kPolicyPolicyRefreshRate,
- key::kPolicyRefreshRate),
PolicyTestParams::ForBooleanPolicy(
kPolicyInstantEnabled,
key::kInstantEnabled),
@@ -509,7 +508,10 @@ INSTANTIATE_TEST_CASE_P(
key::kDiskCacheDir),
PolicyTestParams::ForIntegerPolicy(
kPolicyMaxConnectionsPerProxy,
- key::kMaxConnectionsPerProxy)));
+ key::kMaxConnectionsPerProxy),
+ PolicyTestParams::ForListPolicy(
+ kPolicyURLBlacklist,
+ key::kURLBlacklist)));
// testing::Values has a limit of 50 test templates, which is reached by the
// instantiations above. Add tests for new policies here:
@@ -518,9 +520,6 @@ INSTANTIATE_TEST_CASE_P(
ConfigurationPolicyProviderWinTest,
testing::Values(
PolicyTestParams::ForListPolicy(
- kPolicyURLBlacklist,
- key::kURLBlacklist),
- PolicyTestParams::ForListPolicy(
kPolicyURLWhitelist,
key::kURLWhitelist)));

Powered by Google App Engine
This is Rietveld 408576698