Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3576)

Unified Diff: chromeos/network/network_connect_unittest.cc

Issue 2819993002: [CrOS Tether] Add the notion of a tether DeviceState. (Closed)
Patch Set: stevenjb@ comment. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chromeos/network/managed_state.h ('k') | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 */);
« no previous file with comments | « chromeos/network/managed_state.h ('k') | chromeos/network/network_connection_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698