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

Unified Diff: components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc

Issue 2440473004: Add policy domain for signin screen apps (Closed)
Patch Set: Fix compilation Created 4 years, 2 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: components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc
diff --git a/components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc b/components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc
index fe04f3a0db28fc27a90711a86fb418a5918a4200..3fb519282e7186b416a76258a1782991a8b0fde7 100644
--- a/components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc
+++ b/components/policy/core/common/cloud/component_cloud_policy_service_unittest.cc
@@ -149,8 +149,9 @@ class ComponentCloudPolicyServiceTest : public testing::Test {
void Connect() {
client_ = new MockCloudPolicyClient();
service_.reset(new ComponentCloudPolicyService(
- &delegate_, &registry_, &core_, client_, std::move(owned_cache_),
- request_context_, loop_.task_runner(), loop_.task_runner()));
+ dm_protocol::kChromeExtensionPolicyType, &delegate_, &registry_, &core_,
+ client_, std::move(owned_cache_), request_context_, loop_.task_runner(),
+ loop_.task_runner()));
client_->SetDMToken(ComponentPolicyBuilder::kFakeToken);
EXPECT_EQ(1u, client_->types_to_fetch_.size());
@@ -185,6 +186,7 @@ class ComponentCloudPolicyServiceTest : public testing::Test {
CreateTestSchema());
registry_.SetReady(POLICY_DOMAIN_CHROME);
registry_.SetReady(POLICY_DOMAIN_EXTENSIONS);
+ registry_.SetReady(POLICY_DOMAIN_SIGNIN_EXTENSIONS);
}
void PopulateCache() {
@@ -313,6 +315,7 @@ TEST_F(ComponentCloudPolicyServiceTest, FetchPolicy) {
EXPECT_CALL(*client_, FetchPolicy()).Times(0);
registry_.SetReady(POLICY_DOMAIN_CHROME);
registry_.SetReady(POLICY_DOMAIN_EXTENSIONS);
+ registry_.SetReady(POLICY_DOMAIN_SIGNIN_EXTENSIONS);
LoadStore();
Mock::VerifyAndClearExpectations(client_);
Mock::VerifyAndClearExpectations(&delegate_);
@@ -399,6 +402,7 @@ TEST_F(ComponentCloudPolicyServiceTest, LoadAndPurgeCache) {
TEST_F(ComponentCloudPolicyServiceTest, SignInAfterStartup) {
registry_.SetReady(POLICY_DOMAIN_CHROME);
registry_.SetReady(POLICY_DOMAIN_EXTENSIONS);
+ registry_.SetReady(POLICY_DOMAIN_SIGNIN_EXTENSIONS);
// Initialize the store without credentials.
EXPECT_FALSE(store_.is_initialized());

Powered by Google App Engine
This is Rietveld 408576698