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

Unified Diff: chromeos/network/auto_connect_handler_unittest.cc

Issue 1415683013: Let AutoConnectHandler wait for user policy before disconnecting (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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/auto_connect_handler.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromeos/network/auto_connect_handler_unittest.cc
diff --git a/chromeos/network/auto_connect_handler_unittest.cc b/chromeos/network/auto_connect_handler_unittest.cc
index 11431084a03cd00336083fa5de859701e13fea8f..9749ee44b5c0ae4b8a4ac3c59a3fa6b4bd4f93a5 100644
--- a/chromeos/network/auto_connect_handler_unittest.cc
+++ b/chromeos/network/auto_connect_handler_unittest.cc
@@ -407,6 +407,12 @@ TEST_F(AutoConnectHandlerTest, DisconnectOnPolicyLoading) {
// Because no best service is set, the fake implementation of
// ConnectToBestServices will be a no-op.
SetupPolicy(kPolicy, global_config, false /* load as device policy */);
+
+ // Should not trigger any change until user policy is loaded
+ EXPECT_EQ(shill::kStateOnline, GetServiceState("wifi0"));
+ EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1"));
+
+ SetupPolicy(std::string(), base::DictionaryValue(), true);
EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi0"));
EXPECT_EQ(shill::kStateIdle, GetServiceState("wifi1"));
}
« no previous file with comments | « chromeos/network/auto_connect_handler.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698