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

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

Issue 10496013: Implement the mac policy provider based on the AsyncPolicyLoader. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Renamed to PolicyLoaderMac 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.cc
diff --git a/chrome/browser/policy/configuration_policy_provider_test.cc b/chrome/browser/policy/configuration_policy_provider_test.cc
index 64a83c01ba2ed706c1c2e2b3d43bee1f9cbd14a9..c6c9ab1edb5b45fe5913e990dd48e75b9555b129 100644
--- a/chrome/browser/policy/configuration_policy_provider_test.cc
+++ b/chrome/browser/policy/configuration_policy_provider_test.cc
@@ -14,6 +14,7 @@
#include "policy/policy_constants.h"
#include "testing/gmock/include/gmock/gmock.h"
+using content::BrowserThread;
using ::testing::Mock;
using ::testing::_;
@@ -41,6 +42,16 @@ const PolicyDefinitionList kList = {
} // namespace test_policy_definitions
+PolicyTestBase::PolicyTestBase()
+ : ui_thread_(BrowserThread::UI, &loop_),
+ file_thread_(BrowserThread::FILE, &loop_) {}
+
+PolicyTestBase::~PolicyTestBase() {}
+
+void PolicyTestBase::TearDown() {
+ loop_.RunAllPending();
+}
+
PolicyProviderTestHarness::PolicyProviderTestHarness(PolicyLevel level,
PolicyScope scope)
: level_(level), scope_(scope) {}
@@ -60,7 +71,7 @@ ConfigurationPolicyProviderTest::ConfigurationPolicyProviderTest() {}
ConfigurationPolicyProviderTest::~ConfigurationPolicyProviderTest() {}
void ConfigurationPolicyProviderTest::SetUp() {
- AsynchronousPolicyTestBase::SetUp();
+ PolicyTestBase::SetUp();
test_harness_.reset((*GetParam())());
test_harness_->SetUp();
@@ -79,7 +90,7 @@ void ConfigurationPolicyProviderTest::TearDown() {
// Give providers the chance to clean up after themselves on the file thread.
provider_.reset();
- AsynchronousPolicyTestBase::TearDown();
+ PolicyTestBase::TearDown();
}
void ConfigurationPolicyProviderTest::CheckValue(
« no previous file with comments | « chrome/browser/policy/configuration_policy_provider_test.h ('k') | chrome/browser/policy/policy_loader_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698