Index: chromeos/network/network_connect_unittest.cc |
diff --git a/chromeos/network/network_connect_unittest.cc b/chromeos/network/network_connect_unittest.cc |
index 930b3d0176532f9f0581fcbf855cfd0b832f557b..2eb4d44217d4e478739edf8647052c153acd2620 100644 |
--- a/chromeos/network/network_connect_unittest.cc |
+++ b/chromeos/network/network_connect_unittest.cc |
@@ -336,6 +336,9 @@ TEST_F(NetworkConnectTest, ShowMobileSimDialog_SimUnlocked) { |
TEST_F(NetworkConnectTest, ConnectToTetherNetwork) { |
EXPECT_CALL(*mock_tether_delegate_, ConnectToNetwork(kTether1Guid)); |
+ NetworkHandler::Get()->network_state_handler()->SetTetherTechnologyState( |
+ NetworkStateHandler::TECHNOLOGY_ENABLED); |
+ |
NetworkHandler::Get()->network_state_handler()->AddTetherNetworkState( |
kTether1Guid, "TetherNetwork", "Carrier", 100 /* battery_percentage */, |
100 /* signal_strength */); |
@@ -347,6 +350,9 @@ TEST_F(NetworkConnectTest, ConnectToTetherNetwork) { |
TEST_F(NetworkConnectTest, ConnectToTetherNetwork_TetherNetworkDoesNotExist) { |
EXPECT_CALL(*mock_tether_delegate_, ConnectToNetwork(_)).Times(0); |
+ NetworkHandler::Get()->network_state_handler()->SetTetherTechnologyState( |
+ NetworkStateHandler::TECHNOLOGY_ENABLED); |
+ |
NetworkConnect::Get()->SetTetherDelegate(mock_tether_delegate_.get()); |
NetworkConnect::Get()->ConnectToNetworkId(kTether1Guid); |
} |
@@ -354,6 +360,9 @@ TEST_F(NetworkConnectTest, ConnectToTetherNetwork_TetherNetworkDoesNotExist) { |
TEST_F(NetworkConnectTest, ConnectToTetherNetwork_TetherDelegateNotSet) { |
EXPECT_CALL(*mock_tether_delegate_, ConnectToNetwork(_)).Times(0); |
+ NetworkHandler::Get()->network_state_handler()->SetTetherTechnologyState( |
+ NetworkStateHandler::TECHNOLOGY_ENABLED); |
+ |
NetworkHandler::Get()->network_state_handler()->AddTetherNetworkState( |
kTether1Guid, "TetherNetwork", "Carrier", 100 /* battery_percentage */, |
100 /* signal_strength */); |