Commit ebccd7ec authored by stevenjb@chromium.org's avatar stevenjb@chromium.org

Handle connecting to hidden networks correctly

The new network connect code does not handle hidden networks correctly.
This fixes that, which also fixed the associated issue.

BUG=270936, 166999
R=pneubeck@chromium.org

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@217133 0039d316-1c4b-4281-b951-d872f2087c98
parent 930e8d11
......@@ -71,7 +71,7 @@ var availableTests = [
function startConnectNonexistent() {
chrome.networkingPrivate.startConnect(
"nonexistent_path",
callbackFail("not-found"));
callbackFail("configure-failed"));
},
function startDisconnectNonexistent() {
chrome.networkingPrivate.startDisconnect(
......
......@@ -139,7 +139,7 @@ class CHROMEOS_EXPORT NetworkConnectionHandler
void Init(NetworkStateHandler* network_state_handler,
NetworkConfigurationHandler* network_configuration_handler);
ConnectRequest* pending_request(const std::string& service_path);
ConnectRequest* GetPendingRequest(const std::string& service_path);
// Callback from Shill.Service.GetProperties. Parses |properties| to verify
// whether or not the network appears to be configured. If configured,
......
......@@ -167,7 +167,8 @@ TEST_F(NetworkConnectionHandlerTest, NetworkConnectionHandlerConnectSuccess) {
// Handles basic failure cases.
TEST_F(NetworkConnectionHandlerTest, NetworkConnectionHandlerConnectFailure) {
Connect("no-network");
EXPECT_EQ(NetworkConnectionHandler::kErrorNotFound, GetResultAndReset());
EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed,
GetResultAndReset());
EXPECT_TRUE(Configure(kConfigConnected));
Connect("wifi1");
......@@ -221,7 +222,8 @@ TEST_F(NetworkConnectionHandlerTest,
TEST_F(NetworkConnectionHandlerTest,
NetworkConnectionHandlerDisconnectFailure) {
Connect("no-network");
EXPECT_EQ(NetworkConnectionHandler::kErrorNotFound, GetResultAndReset());
EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed,
GetResultAndReset());
EXPECT_TRUE(Configure(kConfigConnectable));
Disconnect("wifi0");
......
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