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

Side by Side Diff: components/policy/core/common/configuration_policy_provider_test.h

Issue 684513002: Standardize usage of virtual/override/final specifiers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 1 month 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 #ifndef COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 5 #ifndef COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
6 #define COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 6 #define COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 23 matching lines...) Expand all
34 extern const char kKeyBoolean[]; 34 extern const char kKeyBoolean[];
35 extern const char kKeyInteger[]; 35 extern const char kKeyInteger[];
36 extern const char kKeyStringList[]; 36 extern const char kKeyStringList[];
37 extern const char kKeyDictionary[]; 37 extern const char kKeyDictionary[];
38 38
39 } // namespace test_keys 39 } // namespace test_keys
40 40
41 class PolicyTestBase : public testing::Test { 41 class PolicyTestBase : public testing::Test {
42 public: 42 public:
43 PolicyTestBase(); 43 PolicyTestBase();
44 virtual ~PolicyTestBase(); 44 ~PolicyTestBase() override;
45 45
46 // testing::Test: 46 // testing::Test:
47 virtual void SetUp() override; 47 void SetUp() override;
48 virtual void TearDown() override; 48 void TearDown() override;
49 49
50 protected: 50 protected:
51 bool RegisterSchema(const PolicyNamespace& ns, 51 bool RegisterSchema(const PolicyNamespace& ns,
52 const std::string& schema); 52 const std::string& schema);
53 53
54 SchemaRegistry schema_registry_; 54 SchemaRegistry schema_registry_;
55 55
56 // Create an actual IO loop (needed by FilePathWatcher). 56 // Create an actual IO loop (needed by FilePathWatcher).
57 base::MessageLoopForIO loop_; 57 base::MessageLoopForIO loop_;
58 58
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // Abstract policy provider test. This is meant to be instantiated for each 113 // Abstract policy provider test. This is meant to be instantiated for each
114 // policy provider implementation, passing in a suitable harness factory 114 // policy provider implementation, passing in a suitable harness factory
115 // function as the test parameter. 115 // function as the test parameter.
116 class ConfigurationPolicyProviderTest 116 class ConfigurationPolicyProviderTest
117 : public PolicyTestBase, 117 : public PolicyTestBase,
118 public testing::WithParamInterface<CreatePolicyProviderTestHarness> { 118 public testing::WithParamInterface<CreatePolicyProviderTestHarness> {
119 protected: 119 protected:
120 ConfigurationPolicyProviderTest(); 120 ConfigurationPolicyProviderTest();
121 virtual ~ConfigurationPolicyProviderTest(); 121 virtual ~ConfigurationPolicyProviderTest();
122 122
123 virtual void SetUp() override; 123 void SetUp() override;
124 virtual void TearDown() override; 124 void TearDown() override;
125 125
126 // Installs a valid policy and checks whether the provider returns the 126 // Installs a valid policy and checks whether the provider returns the
127 // |expected_value|. 127 // |expected_value|.
128 void CheckValue(const char* policy_name, 128 void CheckValue(const char* policy_name,
129 const base::Value& expected_value, 129 const base::Value& expected_value,
130 base::Closure install_value); 130 base::Closure install_value);
131 131
132 scoped_ptr<PolicyProviderTestHarness> test_harness_; 132 scoped_ptr<PolicyProviderTestHarness> test_harness_;
133 scoped_ptr<ConfigurationPolicyProvider> provider_; 133 scoped_ptr<ConfigurationPolicyProvider> provider_;
134 134
(...skipping 10 matching lines...) Expand all
145 Configuration3rdPartyPolicyProviderTest(); 145 Configuration3rdPartyPolicyProviderTest();
146 virtual ~Configuration3rdPartyPolicyProviderTest(); 146 virtual ~Configuration3rdPartyPolicyProviderTest();
147 147
148 private: 148 private:
149 DISALLOW_COPY_AND_ASSIGN(Configuration3rdPartyPolicyProviderTest); 149 DISALLOW_COPY_AND_ASSIGN(Configuration3rdPartyPolicyProviderTest);
150 }; 150 };
151 151
152 } // namespace policy 152 } // namespace policy
153 153
154 #endif // COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_ 154 #endif // COMPONENTS_POLICY_CORE_COMMON_CONFIGURATION_POLICY_PROVIDER_TEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698