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

Unified Diff: chromeos/components/tether/tether_network_disconnection_handler_unittest.cc

Issue 2821103003: Remove the configuration of Tether-associated Wi-Fi networks once connectivity is lost. (Closed)
Patch Set: 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
Index: chromeos/components/tether/tether_network_disconnection_handler_unittest.cc
diff --git a/chromeos/components/tether/tether_network_disconnection_handler_unittest.cc b/chromeos/components/tether/tether_network_disconnection_handler_unittest.cc
index 4c4b3ede3b56a9a73f4d6bfab5769f389b1e73bc..4270cd8067eb1315804697b4243da6cd821e996a 100644
--- a/chromeos/components/tether/tether_network_disconnection_handler_unittest.cc
+++ b/chromeos/components/tether/tether_network_disconnection_handler_unittest.cc
@@ -9,6 +9,7 @@
#include "base/memory/ptr_util.h"
#include "base/test/scoped_task_environment.h"
#include "chromeos/components/tether/fake_active_host.h"
+#include "chromeos/components/tether/fake_managed_network_configuration_handler.h"
#include "chromeos/dbus/dbus_thread_manager.h"
#include "chromeos/network/network_state.h"
#include "chromeos/network/network_state_test.h"
@@ -51,9 +52,12 @@ class TetherNetworkDisconnectionHandlerTest : public NetworkStateTest {
ConfigureService(CreateConnectedWifiConfigurationJsonString());
fake_active_host_ = base::MakeUnique<FakeActiveHost>();
+ fake_managed_network_configuration_handler_ =
+ base::WrapUnique(new FakeManagedNetworkConfigurationHandler());
handler_ = base::WrapUnique(new TetherNetworkDisconnectionHandler(
- fake_active_host_.get(), network_state_handler()));
+ fake_active_host_.get(), network_state_handler(),
+ fake_managed_network_configuration_handler_.get()));
}
void TearDown() override {
@@ -73,6 +77,8 @@ class TetherNetworkDisconnectionHandlerTest : public NetworkStateTest {
std::string wifi_service_path_;
std::unique_ptr<FakeActiveHost> fake_active_host_;
+ std::unique_ptr<FakeManagedNetworkConfigurationHandler>
+ fake_managed_network_configuration_handler_;
std::unique_ptr<TetherNetworkDisconnectionHandler> handler_;
@@ -91,8 +97,11 @@ TEST_F(TetherNetworkDisconnectionHandlerTest, TestConnectAndDisconnect) {
NotifyDisconnected();
EXPECT_EQ(ActiveHost::ActiveHostStatus::DISCONNECTED,
fake_active_host_->GetActiveHostStatus());
+
+ EXPECT_EQ(wifi_service_path_, fake_managed_network_configuration_handler_
Kyle Horimoto 2017/04/17 20:34:53 nit: Can you fit the second parameter on its own l
stevenjb 2017/04/18 21:03:36 'git cl format'
Ryan Hansberry 2017/04/20 20:57:58 This was the style given by git cl format :(
+ ->last_removed_configuration_path());
}
} // namespace tether
-} // namespace cryptauth
+} // namespace chromeos

Powered by Google App Engine
This is Rietveld 408576698