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

Side by Side Diff: chromeos/components/tether/tether_connector_unittest.cc

Issue 2861883002: [CrOS Tether] Transform NetworkConnectionHandler to an interface. (Closed)
Patch Set: Created 3 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 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/components/tether/tether_connector.h" 5 #include "chromeos/components/tether/tether_connector.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "chromeos/components/tether/connect_tethering_operation.h" 9 #include "chromeos/components/tether/connect_tethering_operation.h"
10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h" 10 #include "chromeos/components/tether/device_id_tether_network_guid_map.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 TestNetworkConnectionHandler() : NetworkConnectionHandler() {} 53 TestNetworkConnectionHandler() : NetworkConnectionHandler() {}
54 ~TestNetworkConnectionHandler() override {} 54 ~TestNetworkConnectionHandler() override {}
55 55
56 void CallTetherDelegate( 56 void CallTetherDelegate(
57 const std::string& tether_network_guid, 57 const std::string& tether_network_guid,
58 const base::Closure& success_callback, 58 const base::Closure& success_callback,
59 const network_handler::ErrorCallback& error_callback) { 59 const network_handler::ErrorCallback& error_callback) {
60 InitiateTetherNetworkConnection(tether_network_guid, success_callback, 60 InitiateTetherNetworkConnection(tether_network_guid, success_callback,
61 error_callback); 61 error_callback);
62 } 62 }
63
64 // NetworkConnectionHandler:
65 void ConnectToNetwork(const std::string& service_path,
66 const base::Closure& success_callback,
67 const network_handler::ErrorCallback& error_callback,
68 bool check_error_state) override {}
stevenjb 2017/05/03 22:05:38 blank lines
Kyle Horimoto 2017/05/03 22:38:29 Done.
69 void DisconnectNetwork(
70 const std::string& service_path,
71 const base::Closure& success_callback,
72 const network_handler::ErrorCallback& error_callback) override {}
73 bool HasConnectingNetwork(const std::string& service_path) override {
74 return false;
75 }
76 bool HasPendingConnectRequest() override { return false; }
77 void Init(NetworkStateHandler* network_state_handler,
78 NetworkConfigurationHandler* network_configuration_handler,
79 ManagedNetworkConfigurationHandler*
80 managed_network_configuration_handler) override {}
81
82 // LoginState::Observer
83 void LoggedInStateChanged() override {}
84
85 // CertLoader::Observer
86 void OnCertificatesLoaded(const net::CertificateList& cert_list,
87 bool initial_load) override {}
63 }; 88 };
64 89
65 class FakeConnectTetheringOperation : public ConnectTetheringOperation { 90 class FakeConnectTetheringOperation : public ConnectTetheringOperation {
66 public: 91 public:
67 FakeConnectTetheringOperation( 92 FakeConnectTetheringOperation(
68 const cryptauth::RemoteDevice& device_to_connect, 93 const cryptauth::RemoteDevice& device_to_connect,
69 BleConnectionManager* connection_manager, 94 BleConnectionManager* connection_manager,
70 TetherHostResponseRecorder* tether_host_response_recorder) 95 TetherHostResponseRecorder* tether_host_response_recorder)
71 : ConnectTetheringOperation(device_to_connect, 96 : ConnectTetheringOperation(device_to_connect,
72 connection_manager, 97 connection_manager,
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
478 EXPECT_EQ(test_devices_[1].GetDeviceId(), 503 EXPECT_EQ(test_devices_[1].GetDeviceId(),
479 fake_active_host_->GetActiveHostDeviceId()); 504 fake_active_host_->GetActiveHostDeviceId());
480 EXPECT_EQ(GetTetherNetworkGuid(test_devices_[1].GetDeviceId()), 505 EXPECT_EQ(GetTetherNetworkGuid(test_devices_[1].GetDeviceId()),
481 fake_active_host_->GetTetherNetworkGuid()); 506 fake_active_host_->GetTetherNetworkGuid());
482 EXPECT_TRUE(fake_active_host_->GetWifiNetworkGuid().empty()); 507 EXPECT_TRUE(fake_active_host_->GetWifiNetworkGuid().empty());
483 } 508 }
484 509
485 } // namespace tether 510 } // namespace tether
486 511
487 } // namespace chromeos 512 } // namespace chromeos
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698