Index: chromeos/components/tether/tether_connector_unittest.cc |
diff --git a/chromeos/components/tether/tether_connector_unittest.cc b/chromeos/components/tether/tether_connector_unittest.cc |
index 3e54708ad375994b240142c754f15dd46564b07d..49e83271e0f3e873bccd85825662aa87309a4751 100644 |
--- a/chromeos/components/tether/tether_connector_unittest.cc |
+++ b/chromeos/components/tether/tether_connector_unittest.cc |
@@ -197,19 +197,6 @@ class TetherConnectorTest : public NetworkStateTest { |
fake_wifi_hotspot_connector_->CallMostRecentCallback(kWifiNetworkGuid); |
} |
- void VerifyTetherAndWifiNetworkAssociation( |
- const std::string& tether_network_guid) { |
- const NetworkState* tether_network_state = |
- network_state_handler()->GetNetworkStateFromGuid(tether_network_guid); |
- EXPECT_TRUE(tether_network_state); |
- EXPECT_EQ(kWifiNetworkGuid, tether_network_state->tether_guid()); |
- |
- const NetworkState* wifi_network_state = |
- network_state_handler()->GetNetworkStateFromGuid(kWifiNetworkGuid); |
- EXPECT_TRUE(wifi_network_state); |
- EXPECT_EQ(tether_network_guid, wifi_network_state->tether_guid()); |
- } |
- |
void SuccessCallback() { result_ = kSuccessResult; } |
void ErrorCallback(const std::string& error_name, |
@@ -326,6 +313,8 @@ TEST_F(TetherConnectorTest, TestConnectingToWifiFails) { |
// connect. |
EXPECT_EQ(kSsid, fake_wifi_hotspot_connector_->most_recent_ssid()); |
EXPECT_EQ(kPassword, fake_wifi_hotspot_connector_->most_recent_password()); |
+ EXPECT_EQ(fake_active_host_->GetTetherNetworkGuid(), |
+ fake_wifi_hotspot_connector_->most_recent_tether_network_guid()); |
fake_wifi_hotspot_connector_->CallMostRecentCallback(""); |
// The failure should have resulted in the host being disconnected. |
@@ -358,10 +347,11 @@ TEST_F(TetherConnectorTest, TestSuccessfulConnection) { |
// Wi-Fi network. |
EXPECT_EQ(kSsid, fake_wifi_hotspot_connector_->most_recent_ssid()); |
EXPECT_EQ(kPassword, fake_wifi_hotspot_connector_->most_recent_password()); |
+ EXPECT_EQ(fake_active_host_->GetTetherNetworkGuid(), |
+ fake_wifi_hotspot_connector_->most_recent_tether_network_guid()); |
SuccessfullyJoinWifiNetwork(); |
- // The active host should now be connected, and the tether and Wi-Fi networks |
- // should be associated. |
+ // The active host should now be connected. |
EXPECT_EQ(ActiveHost::ActiveHostStatus::CONNECTED, |
fake_active_host_->GetActiveHostStatus()); |
EXPECT_EQ(test_devices_[0].GetDeviceId(), |
@@ -369,8 +359,7 @@ TEST_F(TetherConnectorTest, TestSuccessfulConnection) { |
EXPECT_EQ(GetTetherNetworkGuid(test_devices_[0].GetDeviceId()), |
fake_active_host_->GetTetherNetworkGuid()); |
EXPECT_EQ(kWifiNetworkGuid, fake_active_host_->GetWifiNetworkGuid()); |
- VerifyTetherAndWifiNetworkAssociation( |
- GetTetherNetworkGuid(test_devices_[0].GetDeviceId())); |
+ |
EXPECT_EQ(kSuccessResult, GetResultAndReset()); |
} |
@@ -441,6 +430,8 @@ TEST_F(TetherConnectorTest, |
kSsid, kPassword); |
EXPECT_EQ(kSsid, fake_wifi_hotspot_connector_->most_recent_ssid()); |
EXPECT_EQ(kPassword, fake_wifi_hotspot_connector_->most_recent_password()); |
+ EXPECT_EQ(fake_active_host_->GetTetherNetworkGuid(), |
+ fake_wifi_hotspot_connector_->most_recent_tether_network_guid()); |
} |
TEST_F(TetherConnectorTest, |
@@ -460,6 +451,8 @@ TEST_F(TetherConnectorTest, |
fake_active_host_->GetActiveHostStatus()); |
EXPECT_EQ(kSsid, fake_wifi_hotspot_connector_->most_recent_ssid()); |
EXPECT_EQ(kPassword, fake_wifi_hotspot_connector_->most_recent_password()); |
+ EXPECT_EQ(fake_active_host_->GetTetherNetworkGuid(), |
+ fake_wifi_hotspot_connector_->most_recent_tether_network_guid()); |
// While the connection to the Wi-Fi network is in progress, start a new |
// connection attempt. |