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

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

Issue 7827033: Introduce net::HttpServerPropertiesManager to manage server-specific properties. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 prefs::kPluginsDisabledPluginsExceptions), 85 prefs::kPluginsDisabledPluginsExceptions),
86 TypeAndName(kPolicyEnabledPlugins, 86 TypeAndName(kPolicyEnabledPlugins,
87 prefs::kPluginsEnabledPlugins), 87 prefs::kPluginsEnabledPlugins),
88 TypeAndName(kPolicyDisabledSchemes, 88 TypeAndName(kPolicyDisabledSchemes,
89 prefs::kDisabledSchemes), 89 prefs::kDisabledSchemes),
90 TypeAndName(kPolicyAutoSelectCertificateForUrls, 90 TypeAndName(kPolicyAutoSelectCertificateForUrls,
91 prefs::kManagedAutoSelectCertificateForUrls), 91 prefs::kManagedAutoSelectCertificateForUrls),
92 TypeAndName(kPolicyURLBlacklist, 92 TypeAndName(kPolicyURLBlacklist,
93 prefs::kUrlBlacklist), 93 prefs::kUrlBlacklist),
94 TypeAndName(kPolicyURLWhitelist, 94 TypeAndName(kPolicyURLWhitelist,
95 prefs::kUrlWhitelist))); 95 prefs::kUrlWhitelist),
96 TypeAndName(kPolicySpdyServers,
97 prefs::kSpdyServers)));
96 98
97 // Test cases for string-valued policy settings. 99 // Test cases for string-valued policy settings.
98 class ConfigurationPolicyPrefStoreStringTest 100 class ConfigurationPolicyPrefStoreStringTest
99 : public ConfigurationPolicyPrefStoreTestBase< 101 : public ConfigurationPolicyPrefStoreTestBase<
100 testing::TestWithParam<TypeAndName> > { 102 testing::TestWithParam<TypeAndName> > {
101 }; 103 };
102 104
103 TEST_P(ConfigurationPolicyPrefStoreStringTest, GetDefault) { 105 TEST_P(ConfigurationPolicyPrefStoreStringTest, GetDefault) {
104 EXPECT_EQ(PrefStore::READ_NO_VALUE, 106 EXPECT_EQ(PrefStore::READ_NO_VALUE,
105 store_->GetValue(GetParam().pref_name(), NULL)); 107 store_->GetValue(GetParam().pref_name(), NULL));
(...skipping 870 matching lines...) Expand 10 before | Expand all | Expand 10 after
976 978
977 provider_.SetInitializationComplete(true); 979 provider_.SetInitializationComplete(true);
978 EXPECT_FALSE(store_->IsInitializationComplete()); 980 EXPECT_FALSE(store_->IsInitializationComplete());
979 981
980 store_->OnUpdatePolicy(); 982 store_->OnUpdatePolicy();
981 Mock::VerifyAndClearExpectations(&observer_); 983 Mock::VerifyAndClearExpectations(&observer_);
982 EXPECT_TRUE(store_->IsInitializationComplete()); 984 EXPECT_TRUE(store_->IsInitializationComplete());
983 } 985 }
984 986
985 } // namespace policy 987 } // namespace policy
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698