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

Unified Diff: chrome/browser/policy/cloud/cloud_policy_manager_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: rebase 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/cloud/cloud_policy_manager_unittest.cc
diff --git a/chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc b/chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc
index 872e01f9494e08d220e5a507734edad134bbcef5..e705284665227ac741fb13808c7083b72822bff0 100644
--- a/chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc
+++ b/chrome/browser/policy/cloud/cloud_policy_manager_unittest.cc
@@ -16,6 +16,7 @@
#include "chrome/browser/policy/configuration_policy_provider_test.h"
#include "chrome/browser/policy/external_data_fetcher.h"
#include "chrome/browser/policy/mock_configuration_policy_provider.h"
+#include "chrome/browser/policy/schema_registry.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -35,6 +36,7 @@ class TestHarness : public PolicyProviderTestHarness {
virtual void SetUp() OVERRIDE;
virtual ConfigurationPolicyProvider* CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_definition_list) OVERRIDE;
@@ -70,6 +72,7 @@ TestHarness::~TestHarness() {}
void TestHarness::SetUp() {}
ConfigurationPolicyProvider* TestHarness::CreateProvider(
+ SchemaRegistry* registry,
scoped_refptr<base::SequencedTaskRunner> task_runner,
const PolicyDefinitionList* policy_definition_list) {
// Create and initialize the store.
@@ -176,7 +179,7 @@ class CloudPolicyManagerTest : public testing::Test {
EXPECT_CALL(store_, Load());
manager_.reset(new TestCloudPolicyManager(&store_,
loop_.message_loop_proxy()));
- manager_->Init();
+ manager_->Init(&schema_registry_);
Mock::VerifyAndClearExpectations(&store_);
manager_->AddObserver(&observer_);
}
@@ -196,6 +199,7 @@ class CloudPolicyManagerTest : public testing::Test {
PolicyBundle expected_bundle_;
// Policy infrastructure.
+ SchemaRegistry schema_registry_;
MockConfigurationPolicyObserver observer_;
MockCloudPolicyStore store_;
scoped_ptr<TestCloudPolicyManager> manager_;
« no previous file with comments | « chrome/browser/policy/browser_policy_connector.cc ('k') | chrome/browser/policy/cloud/component_cloud_policy_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698