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

Unified Diff: chrome/browser/policy/configuration_policy_provider_test.h

Issue 10656046: Use a schema to decode 3rd party policy on windows, when present. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 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
Index: chrome/browser/policy/configuration_policy_provider_test.h
diff --git a/chrome/browser/policy/configuration_policy_provider_test.h b/chrome/browser/policy/configuration_policy_provider_test.h
index a24519c4d89196218f57af5f02dfba57fc307a62..1404b96135b7dba2c3a259ac024ada9b2c3cce58 100644
--- a/chrome/browser/policy/configuration_policy_provider_test.h
+++ b/chrome/browser/policy/configuration_policy_provider_test.h
@@ -97,6 +97,10 @@ class PolicyProviderTestHarness {
const std::string& policy_name,
const base::DictionaryValue* policy_value) = 0;
+ // Not every provider supports installing 3rd party policy. Those who do
+ // should override this method; the default just makes the test fail.
+ virtual void Install3rdPartyPolicy(const base::DictionaryValue* policies);
+
private:
PolicyLevel level_;
PolicyScope scope_;
@@ -133,6 +137,19 @@ class ConfigurationPolicyProviderTest
DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderTest);
};
+// An extension of ConfigurationPolicyProviderTest that also tests loading of
+// 3rd party policy. Policy provider implementations that support loading of
+// 3rd party policy should also instantiate these tests.
+class Configuration3rdPartyPolicyProviderTest
+ : public ConfigurationPolicyProviderTest {
+ protected:
+ Configuration3rdPartyPolicyProviderTest();
+ virtual ~Configuration3rdPartyPolicyProviderTest();
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(Configuration3rdPartyPolicyProviderTest);
+};
+
} // namespace policy
#endif // CHROME_BROWSER_POLICY_CONFIGURATION_POLICY_PROVIDER_TEST_H_

Powered by Google App Engine
This is Rietveld 408576698