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

Side by Side Diff: chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos_unittest.cc

Issue 478773002: Make Easy unlock disabled by default for enterprise user. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h" 5 #include "chrome/browser/chromeos/policy/user_cloud_policy_manager_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/callback.h" 9 #include "base/callback.h"
10 #include "base/message_loop/message_loop.h" 10 #include "base/message_loop/message_loop.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 // Set up a policy map for testing. 109 // Set up a policy map for testing.
110 policy_map_.Set(key::kHomepageLocation, 110 policy_map_.Set(key::kHomepageLocation,
111 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 111 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
112 new base::StringValue("http://chromium.org"), 112 new base::StringValue("http://chromium.org"),
113 NULL); 113 NULL);
114 policy_map_.Set(key::kChromeOsMultiProfileUserBehavior, 114 policy_map_.Set(key::kChromeOsMultiProfileUserBehavior,
115 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER, 115 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
116 new base::StringValue("primary-only"), 116 new base::StringValue("primary-only"),
117 NULL); 117 NULL);
118 policy_map_.Set(key::kEasyUnlockAllowed,
119 POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
120 new base::FundamentalValue(false),
121 NULL);
118 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string())) 122 expected_bundle_.Get(PolicyNamespace(POLICY_DOMAIN_CHROME, std::string()))
119 .CopyFrom(policy_map_); 123 .CopyFrom(policy_map_);
120 124
121 // Create fake policy blobs to deliver to the client. 125 // Create fake policy blobs to deliver to the client.
122 em::DeviceRegisterResponse* register_response = 126 em::DeviceRegisterResponse* register_response =
123 register_blob_.mutable_register_response(); 127 register_blob_.mutable_register_response();
124 register_response->set_device_management_token("dmtoken123"); 128 register_response->set_device_management_token("dmtoken123");
125 129
126 em::CloudPolicySettings policy_proto; 130 em::CloudPolicySettings policy_proto;
127 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org"); 131 policy_proto.mutable_homepagelocation()->set_value("http://chromium.org");
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME)); 582 EXPECT_TRUE(manager_->IsInitializationComplete(POLICY_DOMAIN_CHROME));
579 EXPECT_TRUE(manager_->core()->client()->is_registered()); 583 EXPECT_TRUE(manager_->core()->client()->is_registered());
580 584
581 // The refresh scheduler takes care of the initial fetch for unmanaged users. 585 // The refresh scheduler takes care of the initial fetch for unmanaged users.
582 // Running the task runner issues the initial fetch. 586 // Running the task runner issues the initial fetch.
583 FetchPolicy( 587 FetchPolicy(
584 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_)); 588 base::Bind(&base::TestSimpleTaskRunner::RunUntilIdle, task_runner_));
585 } 589 }
586 590
587 } // namespace policy 591 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698