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

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

Issue 10868076: Only import certificates with Web trust from ONC if the user is managed and matches the enterprise … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed upload Created 8 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/policy/network_configuration_updater_unittest.cc
diff --git a/chrome/browser/policy/network_configuration_updater_unittest.cc b/chrome/browser/policy/network_configuration_updater_unittest.cc
index a61a1c2f48099721f6d86737344aab47305e804b..bc847e0fa48be1443faaeb055b822ee65e06a719 100644
--- a/chrome/browser/policy/network_configuration_updater_unittest.cc
+++ b/chrome/browser/policy/network_configuration_updater_unittest.cc
@@ -25,7 +25,7 @@ class NetworkConfigurationUpdaterTest
: public testing::TestWithParam<const char*> {
protected:
virtual void SetUp() OVERRIDE {
- EXPECT_CALL(network_library_, LoadOncNetworks(_, "", _, _))
+ EXPECT_CALL(network_library_, LoadOncNetworks(_, "", _, _, _))
.WillRepeatedly(Return(true));
EXPECT_CALL(provider_, IsInitializationComplete())
.WillRepeatedly(Return(true));
@@ -56,19 +56,25 @@ TEST_P(NetworkConfigurationUpdaterTest, InitialUpdate) {
provider_.UpdateChromePolicy(policy);
EXPECT_CALL(network_library_,
- LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()), _))
+ LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()),
+ true, _))
.WillOnce(Return(true));
- NetworkConfigurationUpdater updater(policy_service_.get(), &network_library_);
+ NetworkConfigurationUpdater updater(policy_service_.get(),
+ &network_library_,
+ true);
Mock::VerifyAndClearExpectations(&network_library_);
}
TEST_P(NetworkConfigurationUpdaterTest, PolicyChange) {
- NetworkConfigurationUpdater updater(policy_service_.get(), &network_library_);
+ NetworkConfigurationUpdater updater(policy_service_.get(),
+ &network_library_,
+ false);
// We should update if policy changes.
EXPECT_CALL(network_library_,
- LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()), _))
+ LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()),
+ false, _))
.WillOnce(Return(true));
PolicyMap policy;
policy.Set(GetParam(), POLICY_LEVEL_MANDATORY, POLICY_SCOPE_USER,
@@ -78,7 +84,8 @@ TEST_P(NetworkConfigurationUpdaterTest, PolicyChange) {
// No update if the set the same value again.
EXPECT_CALL(network_library_,
- LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()), _))
+ LoadOncNetworks(kFakeONC, "", NameToONCSource(GetParam()),
+ false, _))
.Times(0);
provider_.UpdateChromePolicy(policy);
Mock::VerifyAndClearExpectations(&network_library_);
@@ -86,7 +93,7 @@ TEST_P(NetworkConfigurationUpdaterTest, PolicyChange) {
// Another update is expected if the policy goes away.
EXPECT_CALL(network_library_,
LoadOncNetworks(NetworkConfigurationUpdater::kEmptyConfiguration,
- "", NameToONCSource(GetParam()), _))
+ "", NameToONCSource(GetParam()), false, _))
.WillOnce(Return(true));
policy.Erase(GetParam());
provider_.UpdateChromePolicy(policy);

Powered by Google App Engine
This is Rietveld 408576698