Commit 4de9f91a authored by pneubeck's avatar pneubeck Committed by Commit bot

Fix the fake portaled WiFi.

The service path argument to set the 'connect behavior' was wrong.
Now, one can again pass the command line argument
 --shill-stub="wifi=portal"
and then connect to the WiFi "Portaled Wifi", which will correctly trigger the captive portal notification.

Review URL: https://codereview.chromium.org/1029563002

Cr-Commit-Position: refs/heads/master@{#321959}
parent 722945d3
......@@ -721,18 +721,15 @@ void FakeShillManagerClient::SetupDefaultEnvironment() {
if (portaled) {
const std::string kPortaledWifiPath = "/service/portaled_wifi";
services->AddService(kPortaledWifiPath,
"portaled_wifi_guid",
"Portaled Wifi" /* name */,
shill::kTypeWifi,
shill::kStatePortal,
add_to_visible);
services->AddService(kPortaledWifiPath, "portaled_wifi_guid",
"Portaled Wifi" /* name */, shill::kTypeWifi,
shill::kStateIdle, add_to_visible);
services->SetServiceProperty(kPortaledWifiPath,
shill::kSecurityClassProperty,
base::StringValue(shill::kSecurityNone));
services->SetConnectBehavior(kPortaledWifiPath,
base::Bind(&UpdatePortaledWifiState,
"portaled_wifi"));
services->SetConnectBehavior(
kPortaledWifiPath,
base::Bind(&UpdatePortaledWifiState, kPortaledWifiPath));
services->SetServiceProperty(kPortaledWifiPath,
shill::kConnectableProperty,
base::FundamentalValue(true));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment