OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/network/network_connection_handler.h" | 5 #include "chromeos/network/network_connection_handler.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <set> | 8 #include <set> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
182 } | 182 } |
183 DBusThreadManager::Get()->GetShillManagerClient()->ConfigureService( | 183 DBusThreadManager::Get()->GetShillManagerClient()->ConfigureService( |
184 *json_dict, | 184 *json_dict, |
185 base::Bind(&ConfigureCallback), | 185 base::Bind(&ConfigureCallback), |
186 base::Bind(&ConfigureErrorCallback)); | 186 base::Bind(&ConfigureErrorCallback)); |
187 base::RunLoop().RunUntilIdle(); | 187 base::RunLoop().RunUntilIdle(); |
188 return true; | 188 return true; |
189 } | 189 } |
190 | 190 |
191 void Connect(const std::string& service_path) { | 191 void Connect(const std::string& service_path) { |
| 192 LOG(ERROR) << "*** QUICHE: " << __func__; |
192 const bool check_error_state = true; | 193 const bool check_error_state = true; |
193 network_connection_handler_->ConnectToNetwork( | 194 network_connection_handler_->ConnectToNetwork( |
194 service_path, | 195 service_path, |
195 base::Bind(&NetworkConnectionHandlerTest::SuccessCallback, | 196 base::Bind(&NetworkConnectionHandlerTest::SuccessCallback, |
196 base::Unretained(this)), | 197 base::Unretained(this)), |
197 base::Bind(&NetworkConnectionHandlerTest::ErrorCallback, | 198 base::Bind(&NetworkConnectionHandlerTest::ErrorCallback, |
198 base::Unretained(this)), | 199 base::Unretained(this)), |
199 check_error_state); | 200 check_error_state); |
200 base::RunLoop().RunUntilIdle(); | 201 base::RunLoop().RunUntilIdle(); |
201 } | 202 } |
(...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
465 Connect(kNoNetwork); | 466 Connect(kNoNetwork); |
466 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, | 467 EXPECT_EQ(NetworkConnectionHandler::kErrorConfigureFailed, |
467 GetResultAndReset()); | 468 GetResultAndReset()); |
468 | 469 |
469 EXPECT_TRUE(Configure(kConfigConnectable)); | 470 EXPECT_TRUE(Configure(kConfigConnectable)); |
470 Disconnect(kWifi0); | 471 Disconnect(kWifi0); |
471 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); | 472 EXPECT_EQ(NetworkConnectionHandler::kErrorNotConnected, GetResultAndReset()); |
472 } | 473 } |
473 | 474 |
474 } // namespace chromeos | 475 } // namespace chromeos |
OLD | NEW |