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

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: Comments addressed & Removed default auto select cert setting. 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 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 283
284 INSTANTIATE_TEST_CASE_P( 284 INSTANTIATE_TEST_CASE_P(
285 ConfigurationPolicyPrefStoreIntegerTestInstance, 285 ConfigurationPolicyPrefStoreIntegerTestInstance,
286 ConfigurationPolicyPrefStoreIntegerTest, 286 ConfigurationPolicyPrefStoreIntegerTest,
287 testing::Values( 287 testing::Values(
288 TypeAndName(kPolicyRestoreOnStartup, 288 TypeAndName(kPolicyRestoreOnStartup,
289 prefs::kRestoreOnStartup), 289 prefs::kRestoreOnStartup),
290 TypeAndName(kPolicyPolicyRefreshRate, 290 TypeAndName(kPolicyPolicyRefreshRate,
291 prefs::kUserPolicyRefreshRate), 291 prefs::kUserPolicyRefreshRate),
292 TypeAndName(kPolicyMaxConnectionsPerProxy, 292 TypeAndName(kPolicyMaxConnectionsPerProxy,
293 prefs::kMaxConnectionsPerProxy), 293 prefs::kMaxConnectionsPerProxy)));
294 TypeAndName(kPolicyDefaultAutoSelectCertificateSetting,
295 prefs::kManagedDefaultAutoSelectCertificateSetting)));
296 294
297 // Test cases for the proxy policy settings. 295 // Test cases for the proxy policy settings.
298 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test { 296 class ConfigurationPolicyPrefStoreProxyTest : public testing::Test {
299 protected: 297 protected:
300 // Verify that all the proxy prefs are set to the specified expected values. 298 // Verify that all the proxy prefs are set to the specified expected values.
301 static void VerifyProxyPrefs( 299 static void VerifyProxyPrefs(
302 const ConfigurationPolicyPrefStore& store, 300 const ConfigurationPolicyPrefStore& store,
303 const std::string& expected_proxy_server, 301 const std::string& expected_proxy_server,
304 const std::string& expected_proxy_pac_url, 302 const std::string& expected_proxy_pac_url,
305 const std::string& expected_proxy_bypass_list, 303 const std::string& expected_proxy_bypass_list,
(...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after
974 972
975 provider_.SetInitializationComplete(true); 973 provider_.SetInitializationComplete(true);
976 EXPECT_FALSE(store_->IsInitializationComplete()); 974 EXPECT_FALSE(store_->IsInitializationComplete());
977 975
978 store_->OnUpdatePolicy(); 976 store_->OnUpdatePolicy();
979 Mock::VerifyAndClearExpectations(&observer_); 977 Mock::VerifyAndClearExpectations(&observer_);
980 EXPECT_TRUE(store_->IsInitializationComplete()); 978 EXPECT_TRUE(store_->IsInitializationComplete());
981 } 979 }
982 980
983 } // namespace policy 981 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698