| Index: chromeos/network/managed_network_configuration_handler_unittest.cc
|
| diff --git a/chromeos/network/managed_network_configuration_handler_unittest.cc b/chromeos/network/managed_network_configuration_handler_unittest.cc
|
| index b72fb8601e94181810bead0a840bf8b3d39b7923..41af02c1ddfe8079361b2f432817d70f4ba7c228 100644
|
| --- a/chromeos/network/managed_network_configuration_handler_unittest.cc
|
| +++ b/chromeos/network/managed_network_configuration_handler_unittest.cc
|
| @@ -379,6 +379,46 @@ TEST_F(ManagedNetworkConfigurationHandlerTest, SetPolicyManageUnconfigured) {
|
| message_loop_.RunUntilIdle();
|
| }
|
|
|
| +TEST_F(ManagedNetworkConfigurationHandlerTest, EnableManagedCredentialsWiFi) {
|
| + InitializeStandardProfiles();
|
| + scoped_ptr<base::DictionaryValue> expected_shill_properties =
|
| + test_utils::ReadTestDictionary(
|
| + "policy/shill_policy_autoconnect_on_unconfigured_wifi1.json");
|
| +
|
| + EXPECT_CALL(*mock_profile_client_,
|
| + GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _));
|
| +
|
| + EXPECT_CALL(*mock_manager_client_,
|
| + ConfigureServiceForProfile(
|
| + dbus::ObjectPath(kUser1ProfilePath),
|
| + IsEqualTo(expected_shill_properties.get()),
|
| + _, _));
|
| +
|
| + SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1,
|
| + "policy/policy_wifi1_autoconnect.onc");
|
| + message_loop_.RunUntilIdle();
|
| +}
|
| +
|
| +TEST_F(ManagedNetworkConfigurationHandlerTest, EnableManagedCredentialsVPN) {
|
| + InitializeStandardProfiles();
|
| + scoped_ptr<base::DictionaryValue> expected_shill_properties =
|
| + test_utils::ReadTestDictionary(
|
| + "policy/shill_policy_autoconnect_on_unconfigured_vpn.json");
|
| +
|
| + EXPECT_CALL(*mock_profile_client_,
|
| + GetProperties(dbus::ObjectPath(kUser1ProfilePath), _, _));
|
| +
|
| + EXPECT_CALL(*mock_manager_client_,
|
| + ConfigureServiceForProfile(
|
| + dbus::ObjectPath(kUser1ProfilePath),
|
| + IsEqualTo(expected_shill_properties.get()),
|
| + _, _));
|
| +
|
| + SetPolicy(::onc::ONC_SOURCE_USER_POLICY, kUser1,
|
| + "policy/policy_vpn_autoconnect.onc");
|
| + message_loop_.RunUntilIdle();
|
| +}
|
| +
|
| // Ensure that EAP settings for ethernet are matched with the right profile
|
| // entry and written to the dedicated EthernetEAP service.
|
| TEST_F(ManagedNetworkConfigurationHandlerTest,
|
|
|