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

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

Issue 56623005: Policy providers all get a SchemaRegistry to work with. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@chrome-policy-schema-9-purge-with-callback
Patch Set: Fixed mac tests Created 7 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/policy_loader_win_unittest.cc
diff --git a/chrome/browser/policy/policy_loader_win_unittest.cc b/chrome/browser/policy/policy_loader_win_unittest.cc
index de822a1344f7bc9d17b7df28fc2f834ea6868459..859aca195c33197ff235a69450a6545e23496ae6 100644
--- a/chrome/browser/policy/policy_loader_win_unittest.cc
+++ b/chrome/browser/policy/policy_loader_win_unittest.cc
@@ -252,6 +252,7 @@ class RegistryTestHarness : public PolicyProviderTestHarness,
virtual void SetUp() OVERRIDE;
virtual ConfigurationPolicyProvider* CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_list) OVERRIDE;
@@ -303,6 +304,7 @@ class PRegTestHarness : public PolicyProviderTestHarness,
virtual void SetUp() OVERRIDE;
virtual ConfigurationPolicyProvider* CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_list) OVERRIDE;
@@ -420,11 +422,12 @@ RegistryTestHarness::~RegistryTestHarness() {}
void RegistryTestHarness::SetUp() {}
ConfigurationPolicyProvider* RegistryTestHarness::CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_list) {
scoped_ptr<AsyncPolicyLoader> loader(new PolicyLoaderWin(
task_runner, policy_list, kRegistryChromePolicyKey, this));
- return new AsyncPolicyProvider(loader.Pass());
+ return new AsyncPolicyProvider(registry, loader.Pass());
}
void RegistryTestHarness::InstallEmptyPolicy() {}
@@ -552,11 +555,12 @@ void PRegTestHarness::SetUp() {
}
ConfigurationPolicyProvider* PRegTestHarness::CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_list) {
scoped_ptr<AsyncPolicyLoader> loader(new PolicyLoaderWin(
task_runner, policy_list, kRegistryChromePolicyKey, this));
- return new AsyncPolicyProvider(loader.Pass());
+ return new AsyncPolicyProvider(registry, loader.Pass());
}
void PRegTestHarness::InstallEmptyPolicy() {}
@@ -789,6 +793,8 @@ class PolicyLoaderWinTest : public PolicyTestBase,
virtual ~PolicyLoaderWinTest() {}
virtual void SetUp() OVERRIDE {
+ PolicyTestBase::SetUp();
+
ASSERT_TRUE(PathService::Get(base::DIR_SOURCE_ROOT, &test_data_dir_));
test_data_dir_ = test_data_dir_.AppendASCII("chrome")
.AppendASCII("test")
@@ -826,7 +832,8 @@ class PolicyLoaderWinTest : public PolicyTestBase,
PolicyLoaderWin loader(loop_.message_loop_proxy(),
&test_policy_definitions::kList, kTestPolicyKey,
this);
- scoped_ptr<PolicyBundle> loaded(loader.Load());
+ scoped_ptr<PolicyBundle> loaded(
+ loader.InitialLoad(schema_registry_.schema_map()));
return loaded->Equals(expected);
}

Powered by Google App Engine
This is Rietveld 408576698