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

Side by Side Diff: chrome/browser/policy/configuration_policy_pref_store_unittest.cc

Issue 7014036: Split the policy refresh rate preference into user- and device-policy refresh rate. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Nits. Created 9 years, 6 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/file_path.h" 5 #include "base/file_path.h"
6 #include "base/memory/ref_counted.h" 6 #include "base/memory/ref_counted.h"
7 #include "chrome/browser/policy/configuration_policy_pref_store.h" 7 #include "chrome/browser/policy/configuration_policy_pref_store.h"
8 #include "chrome/browser/policy/mock_configuration_policy_provider.h" 8 #include "chrome/browser/policy/mock_configuration_policy_provider.h"
9 #include "chrome/browser/prefs/proxy_config_dictionary.h" 9 #include "chrome/browser/prefs/proxy_config_dictionary.h"
10 #include "chrome/common/pref_names.h" 10 #include "chrome/common/pref_names.h"
(...skipping 255 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 EXPECT_TRUE(FundamentalValue(2).Equals(value)); 266 EXPECT_TRUE(FundamentalValue(2).Equals(value));
267 } 267 }
268 268
269 INSTANTIATE_TEST_CASE_P( 269 INSTANTIATE_TEST_CASE_P(
270 ConfigurationPolicyPrefStoreIntegerTestInstance, 270 ConfigurationPolicyPrefStoreIntegerTestInstance,
271 ConfigurationPolicyPrefStoreIntegerTest, 271 ConfigurationPolicyPrefStoreIntegerTest,
272 testing::Values( 272 testing::Values(
273 TypeAndName(kPolicyRestoreOnStartup, 273 TypeAndName(kPolicyRestoreOnStartup,
274 prefs::kRestoreOnStartup), 274 prefs::kRestoreOnStartup),
275 TypeAndName(kPolicyPolicyRefreshRate, 275 TypeAndName(kPolicyPolicyRefreshRate,
276 prefs::kPolicyRefreshRate))); 276 prefs::kUserPolicyRefreshRate)));
277 277
278 // Test cases for the proxy policy settings. 278 // Test cases for the proxy policy settings.
279 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { 279 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test {
280 protected: 280 protected:
281 // Verify that all the proxy prefs are set to the specified expected values. 281 // Verify that all the proxy prefs are set to the specified expected values.
282 static void VerifyProxyPrefs( 282 static void VerifyProxyPrefs(
283 const ConfigurationPolicyPrefStore& store, 283 const ConfigurationPolicyPrefStore& store,
284 const std::string& expected_proxy_server, 284 const std::string& expected_proxy_server,
285 const std::string& expected_proxy_pac_url, 285 const std::string& expected_proxy_pac_url,
286 const std::string& expected_proxy_bypass_list, 286 const std::string& expected_proxy_bypass_list,
(...skipping 576 matching lines...) Expand 10 before | Expand all | Expand 10 after
863 863
864 provider_.SetInitializationComplete(true); 864 provider_.SetInitializationComplete(true);
865 EXPECT_FALSE(store_->IsInitializationComplete()); 865 EXPECT_FALSE(store_->IsInitializationComplete());
866 866
867 store_->OnUpdatePolicy(); 867 store_->OnUpdatePolicy();
868 Mock::VerifyAndClearExpectations(&observer_); 868 Mock::VerifyAndClearExpectations(&observer_);
869 EXPECT_TRUE(store_->IsInitializationComplete()); 869 EXPECT_TRUE(store_->IsInitializationComplete());
870 } 870 }
871 871
872 } // namespace policy 872 } // namespace policy
OLDNEW
« no previous file with comments | « chrome/browser/policy/configuration_policy_pref_store.cc ('k') | chrome/browser/policy/device_policy_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698