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

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

Issue 6091002: Refactor the windows policy provider to use AsynchronousPolicyProvider. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweaks Created 10 years 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/asynchronous_policy_provider_unittest.cc
diff --git a/chrome/browser/policy/asynchronous_policy_provider_unittest.cc b/chrome/browser/policy/asynchronous_policy_provider_unittest.cc
index 64306ebcf67bce9a25c9c02f1ab3e4c37b86d189..f0d925e40d94a2ff20ee2b8ffa4fd8242520ab9f 100644
--- a/chrome/browser/policy/asynchronous_policy_provider_unittest.cc
+++ b/chrome/browser/policy/asynchronous_policy_provider_unittest.cc
@@ -17,6 +17,7 @@ using ::testing::Return;
namespace policy {
+// Creating the provider should provide initial policy.
TEST_F(AsynchronousPolicyTestBase, Provide) {
InSequence s;
DictionaryValue* policies = new DictionaryValue();
@@ -25,10 +26,12 @@ TEST_F(AsynchronousPolicyTestBase, Provide) {
EXPECT_CALL(*store_, Apply(policy::kPolicySyncDisabled, _)).Times(1);
AsynchronousPolicyProvider provider(
ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(),
- new AsynchronousPolicyLoader(delegate_.release()));
+ new AsynchronousPolicyLoader(delegate_.release(), 10));
provider.Provide(store_.get());
}
+
+// Trigger a refresh manually and ensure that policy gets reloaded.
TEST_F(AsynchronousPolicyTestBase, ProvideAfterRefresh) {
InSequence s;
DictionaryValue* original_policies = new DictionaryValue();
@@ -40,7 +43,8 @@ TEST_F(AsynchronousPolicyTestBase, ProvideAfterRefresh) {
true);
EXPECT_CALL(*delegate_, Load()).WillOnce(Return(refresh_policies));
AsynchronousPolicyLoader* loader = new AsynchronousPolicyLoader(
- delegate_.release());
+ delegate_.release(),
+ 10);
Mattias Nissler (ping if slow) 2010/12/21 16:42:24 Linebreak after = and all arguments on the same li
danno 2010/12/22 11:02:17 Done.
AsynchronousPolicyProvider provider(
ConfigurationPolicyPrefStore::GetChromePolicyDefinitionList(),
loader);

Powered by Google App Engine
This is Rietveld 408576698