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

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

Issue 7828022: Add a method to the HostContentSettings map to return the |Value| of a content setting (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update example value of AutoSelectCertificate policy in policy_template.json Created 9 years, 3 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/incognito_mode_prefs.h" 9 #include "chrome/browser/prefs/incognito_mode_prefs.h"
10 #include "chrome/browser/prefs/proxy_config_dictionary.h" 10 #include "chrome/browser/prefs/proxy_config_dictionary.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 287
288 INSTANTIATE_TEST_CASE_P( 288 INSTANTIATE_TEST_CASE_P(
289 ConfigurationPolicyPrefStoreIntegerTestInstance, 289 ConfigurationPolicyPrefStoreIntegerTestInstance,
290 ConfigurationPolicyPrefStoreIntegerTest, 290 ConfigurationPolicyPrefStoreIntegerTest,
291 testing::Values( 291 testing::Values(
292 TypeAndName(kPolicyRestoreOnStartup, 292 TypeAndName(kPolicyRestoreOnStartup,
293 prefs::kRestoreOnStartup), 293 prefs::kRestoreOnStartup),
294 TypeAndName(kPolicyPolicyRefreshRate, 294 TypeAndName(kPolicyPolicyRefreshRate,
295 prefs::kUserPolicyRefreshRate), 295 prefs::kUserPolicyRefreshRate),
296 TypeAndName(kPolicyMaxConnectionsPerProxy, 296 TypeAndName(kPolicyMaxConnectionsPerProxy,
297 prefs::kMaxConnectionsPerProxy), 297 prefs::kMaxConnectionsPerProxy)));
298 TypeAndName(kPolicyDefaultAutoSelectCertificateSetting,
299 prefs::kManagedDefaultAutoSelectCertificateSetting)));
300 298
301 // Test cases for the proxy policy settings. 299 // Test cases for the proxy policy settings.
302 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { 300 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test {
303 protected: 301 protected:
304 // Verify that all the proxy prefs are set to the specified expected values. 302 // Verify that all the proxy prefs are set to the specified expected values.
305 static void VerifyProxyPrefs( 303 static void VerifyProxyPrefs(
306 const ConfigurationPolicyPrefStore& store, 304 const ConfigurationPolicyPrefStore& store,
307 const std::string& expected_proxy_server, 305 const std::string& expected_proxy_server,
308 const std::string& expected_proxy_pac_url, 306 const std::string& expected_proxy_pac_url,
309 const std::string& expected_proxy_bypass_list, 307 const std::string& expected_proxy_bypass_list,
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
978 976
979 provider_.SetInitializationComplete(true); 977 provider_.SetInitializationComplete(true);
980 EXPECT_FALSE(store_->IsInitializationComplete()); 978 EXPECT_FALSE(store_->IsInitializationComplete());
981 979
982 store_->OnUpdatePolicy(); 980 store_->OnUpdatePolicy();
983 Mock::VerifyAndClearExpectations(&observer_); 981 Mock::VerifyAndClearExpectations(&observer_);
984 EXPECT_TRUE(store_->IsInitializationComplete()); 982 EXPECT_TRUE(store_->IsInitializationComplete());
985 } 983 }
986 984
987 } // namespace policy 985 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698