Chromium Code Reviews| 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 006ef4d16b84e9bd6274f9f6356041bf70624b1f..a24519c4d89196218f57af5f02dfba57fc307a62 100644 |
| --- a/chrome/browser/policy/configuration_policy_provider_test.h |
| +++ b/chrome/browser/policy/configuration_policy_provider_test.h |
| @@ -12,7 +12,7 @@ |
| #include "base/callback_forward.h" |
| #include "base/memory/scoped_ptr.h" |
| #include "base/message_loop.h" |
| -#include "chrome/browser/policy/asynchronous_policy_test_base.h" |
| +#include "chrome/browser/policy/policy_constants.h" |
| #include "content/public/test/test_browser_thread.h" |
| #include "testing/gtest/include/gtest/gtest.h" |
| @@ -24,7 +24,7 @@ class Value; |
| namespace policy { |
| -class AsynchronousPolicyProvider; |
| +class ConfigurationPolicyProvider; |
| struct PolicyDefinitionList; |
| // A stripped-down policy definition list that contains entries for the |
| @@ -43,6 +43,25 @@ extern const PolicyDefinitionList kList; |
| } // namespace test_policy_definitions |
| +class PolicyTestBase : public testing::Test { |
|
Mattias Nissler (ping if slow)
2012/06/05 11:55:59
AsynchronousPolicyTestBase is going away I guess?
Joao da Silva
2012/06/05 13:52:10
Yes, the cleanup CL deletes it.
|
| + public: |
| + PolicyTestBase(); |
| + virtual ~PolicyTestBase(); |
| + |
| + // testing::Test: |
| + virtual void TearDown() OVERRIDE; |
| + |
| + protected: |
| + // Create an actual IO loop (needed by FilePathWatcher). |
| + MessageLoopForIO loop_; |
| + |
| + private: |
| + content::TestBrowserThread ui_thread_; |
| + content::TestBrowserThread file_thread_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(PolicyTestBase); |
| +}; |
| + |
| // An interface for creating a test policy provider and creating a policy |
| // provider instance for testing. Used as the parameter to the abstract |
| // ConfigurationPolicyProviderTest below. |
| @@ -57,7 +76,7 @@ class PolicyProviderTestHarness { |
| virtual void SetUp() = 0; |
| // Create a new policy provider. |
| - virtual AsynchronousPolicyProvider* CreateProvider( |
| + virtual ConfigurationPolicyProvider* CreateProvider( |
| const PolicyDefinitionList* policy_definition_list) = 0; |
| // Returns the policy level and scope set by the policy provider. |
| @@ -92,7 +111,7 @@ typedef PolicyProviderTestHarness* (*CreatePolicyProviderTestHarness)(); |
| // policy provider implementation, passing in a suitable harness factory |
| // function as the test parameter. |
| class ConfigurationPolicyProviderTest |
| - : public AsynchronousPolicyTestBase, |
| + : public PolicyTestBase, |
| public testing::WithParamInterface<CreatePolicyProviderTestHarness> { |
| protected: |
| ConfigurationPolicyProviderTest(); |
| @@ -108,7 +127,7 @@ class ConfigurationPolicyProviderTest |
| base::Closure install_value); |
| scoped_ptr<PolicyProviderTestHarness> test_harness_; |
| - scoped_ptr<AsynchronousPolicyProvider> provider_; |
| + scoped_ptr<ConfigurationPolicyProvider> provider_; |
| private: |
| DISALLOW_COPY_AND_ASSIGN(ConfigurationPolicyProviderTest); |