| Index: chromeos/network/shill_property_handler_unittest.cc
|
| diff --git a/chromeos/network/shill_property_handler_unittest.cc b/chromeos/network/shill_property_handler_unittest.cc
|
| index 3f705ab7c2aa0b23497f6d314a51d24cc3d594ba..75931942d925f07bd0908f878d8b1a79532b526a 100644
|
| --- a/chromeos/network/shill_property_handler_unittest.cc
|
| +++ b/chromeos/network/shill_property_handler_unittest.cc
|
| @@ -501,4 +501,34 @@ TEST_F(ShillPropertyHandlerTest, ShillPropertyHandlerServiceList) {
|
| shill::kServiceCompleteListProperty)[kTestServicePath2]);
|
| }
|
|
|
| +TEST_F(ShillPropertyHandlerTest, ProhibitedTechnologies) {
|
| + std::vector<std::string> prohibited_technologies;
|
| + prohibited_technologies.push_back(shill::kTypeEthernet);
|
| + EXPECT_TRUE(
|
| + shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet));
|
| + shill_property_handler_->SetProhibitedTechnologies(
|
| + prohibited_technologies, network_handler::ErrorCallback());
|
| + message_loop_.RunUntilIdle();
|
| + // Disabled
|
| + EXPECT_FALSE(
|
| + shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet));
|
| +
|
| + // Can not enable it back
|
| + shill_property_handler_->SetTechnologyEnabled(
|
| + shill::kTypeEthernet, true, network_handler::ErrorCallback());
|
| + message_loop_.RunUntilIdle();
|
| + EXPECT_FALSE(
|
| + shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet));
|
| +
|
| + // Can enable it back after policy changes
|
| + prohibited_technologies.clear();
|
| + shill_property_handler_->SetProhibitedTechnologies(
|
| + prohibited_technologies, network_handler::ErrorCallback());
|
| + shill_property_handler_->SetTechnologyEnabled(
|
| + shill::kTypeEthernet, true, network_handler::ErrorCallback());
|
| + message_loop_.RunUntilIdle();
|
| + EXPECT_TRUE(
|
| + shill_property_handler_->IsTechnologyEnabled(shill::kTypeEthernet));
|
| +}
|
| +
|
| } // namespace chromeos
|
|
|