Index: components/policy/core/common/configuration_policy_provider_test.h |
diff --git a/components/policy/core/common/configuration_policy_provider_test.h b/components/policy/core/common/configuration_policy_provider_test.h |
index 8de2d541afe9b5818bde8bdfde2021e36292a106..4a1a630b71ba4c266c79a983db3c3e83747b0117 100644 |
--- a/components/policy/core/common/configuration_policy_provider_test.h |
+++ b/components/policy/core/common/configuration_policy_provider_test.h |
@@ -30,6 +30,7 @@ class ConfigurationPolicyProvider; |
namespace test_keys { |
+// Key constants for general use. |
extern const char kKeyString[]; |
extern const char kKeyBoolean[]; |
extern const char kKeyInteger[]; |
@@ -81,9 +82,17 @@ class PolicyProviderTestHarness { |
scoped_refptr<base::SequencedTaskRunner> task_runner) = 0; |
// Returns the policy level, scope and source set by the policy provider. |
- PolicyLevel policy_level() const; |
- PolicyScope policy_scope() const; |
- PolicySource policy_source() const; |
+ PolicyLevel policy_level() const { return level_; } |
+ PolicyScope policy_scope() const { return scope_; } |
+ PolicySource policy_source() const { return source_; } |
+ |
+ // Returns policy keys and matching schema. |
+ const char* key_string() const { return key_string_; } |
+ const char* key_boolean() const { return key_boolean_; } |
+ const char* key_integer() const { return key_integer_; } |
+ const char* key_stringlist() const { return key_stringlist_; } |
+ const char* key_dictionary() const { return key_dictionary_; } |
+ const char* test_schema() const { return test_schema_; } |
// Helpers to configure the environment the policy provider reads from. |
virtual void InstallEmptyPolicy() = 0; |
@@ -103,6 +112,14 @@ class PolicyProviderTestHarness { |
// should override this method; the default just makes the test fail. |
virtual void Install3rdPartyPolicy(const base::DictionaryValue* policies); |
+ protected: |
+ const char* key_string_; |
+ const char* key_boolean_; |
+ const char* key_integer_; |
+ const char* key_stringlist_; |
+ const char* key_dictionary_; |
+ const char* test_schema_; |
+ |
private: |
PolicyLevel level_; |
PolicyScope scope_; |
@@ -133,7 +150,7 @@ class ConfigurationPolicyProviderTest |
const base::Value& expected_value, |
base::Closure install_value); |
- std::unique_ptr<PolicyProviderTestHarness> test_harness_; |
+ std::unique_ptr<PolicyProviderTestHarness> harness_; |
std::unique_ptr<ConfigurationPolicyProvider> provider_; |
private: |