diff options
author | chocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 01:08:42 +0000 |
---|---|---|
committer | chocobo@chromium.org <chocobo@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-12-15 01:08:42 +0000 |
commit | b053e3e31795c5a944b074516786eca4e30893d5 (patch) | |
tree | c880107f9d6f13deb26b904b08ebcbe4678fe7ad /chrome/browser/policy/network_configuration_updater_unittest.cc | |
parent | 1bedb77908a1543e79a63283f0d54ffdd458a3bf (diff) | |
download | chromium_src-b053e3e31795c5a944b074516786eca4e30893d5.zip chromium_src-b053e3e31795c5a944b074516786eca4e30893d5.tar.gz chromium_src-b053e3e31795c5a944b074516786eca4e30893d5.tar.bz2 |
Show parse errors in the UI when loading ONC files.
Resubmitting reverted CL with fix
BUG=chromium-os:23757
TEST=manual
Review URL: http://codereview.chromium.org/8883046
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@114558 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/policy/network_configuration_updater_unittest.cc')
-rw-r--r-- | chrome/browser/policy/network_configuration_updater_unittest.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/chrome/browser/policy/network_configuration_updater_unittest.cc b/chrome/browser/policy/network_configuration_updater_unittest.cc index d1e71a2..82db2e9 100644 --- a/chrome/browser/policy/network_configuration_updater_unittest.cc +++ b/chrome/browser/policy/network_configuration_updater_unittest.cc @@ -11,6 +11,7 @@ using testing::Mock; using testing::Return; +using testing::_; namespace policy { @@ -26,7 +27,7 @@ class NetworkConfigurationUpdaterTest TEST_P(NetworkConfigurationUpdaterTest, InitialUpdate) { provider_.AddPolicy(GetParam(), Value::CreateStringValue(kFakeONC)); - EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "")) + EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "", _)) .WillRepeatedly(Return(true)); NetworkConfigurationUpdater updater(&provider_, &network_library_); @@ -37,20 +38,20 @@ TEST_P(NetworkConfigurationUpdaterTest, PolicyChange) { NetworkConfigurationUpdater updater(&provider_, &network_library_); // We should update if policy changes. - EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "")) + EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "", _)) .WillOnce(Return(true)); provider_.AddPolicy(GetParam(), Value::CreateStringValue(kFakeONC)); provider_.NotifyPolicyUpdated(); Mock::VerifyAndClearExpectations(&network_library_); // No update if the set the same value again. - EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "")) + EXPECT_CALL(network_library_, LoadOncNetworks(kFakeONC, "", _)) .Times(0); provider_.NotifyPolicyUpdated(); Mock::VerifyAndClearExpectations(&network_library_); // Another update is expected if the policy goes away. - EXPECT_CALL(network_library_, LoadOncNetworks("", "")) + EXPECT_CALL(network_library_, LoadOncNetworks("", "", _)) .WillOnce(Return(true)); provider_.RemovePolicy(GetParam()); provider_.NotifyPolicyUpdated(); |