OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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/network_connection_handler_tether_delegate.
h" | 5 #include "chromeos/components/tether/network_connection_handler_tether_delegate.
h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "chromeos/components/tether/tether_connector.h" | 9 #include "chromeos/components/tether/tether_connector.h" |
10 #include "chromeos/components/tether/tether_disconnector.h" | 10 #include "chromeos/components/tether/tether_disconnector.h" |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 | 80 |
81 MOCK_METHOD3( | 81 MOCK_METHOD3( |
82 ConnectToNetwork, | 82 ConnectToNetwork, |
83 void(const std::string& tether_network_guid, | 83 void(const std::string& tether_network_guid, |
84 const base::Closure& success_callback, | 84 const base::Closure& success_callback, |
85 const network_handler::StringResultCallback& error_callback)); | 85 const network_handler::StringResultCallback& error_callback)); |
86 }; | 86 }; |
87 | 87 |
88 class MockTetherDisconnector : public TetherDisconnector { | 88 class MockTetherDisconnector : public TetherDisconnector { |
89 public: | 89 public: |
90 MockTetherDisconnector() | 90 MockTetherDisconnector() : TetherDisconnector() {} |
91 : TetherDisconnector(nullptr /* network_connection_handler */, | |
92 nullptr /* network_state_handler */, | |
93 nullptr /* active_host */, | |
94 nullptr /* ble_connection_manager */, | |
95 nullptr /* network_configuration_remover */, | |
96 nullptr /* tether_connector */, | |
97 nullptr /* device_id_tether_network_guid_map */, | |
98 nullptr /* tether_host_fetcher */) {} | |
99 ~MockTetherDisconnector() override {} | 91 ~MockTetherDisconnector() override {} |
100 | 92 |
101 MOCK_METHOD3( | 93 MOCK_METHOD3( |
102 DisconnectFromNetwork, | 94 DisconnectFromNetwork, |
103 void(const std::string& tether_network_guid, | 95 void(const std::string& tether_network_guid, |
104 const base::Closure& success_callback, | 96 const base::Closure& success_callback, |
105 const network_handler::StringResultCallback& error_callback)); | 97 const network_handler::StringResultCallback& error_callback)); |
106 }; | 98 }; |
107 | 99 |
108 } // namespace | 100 } // namespace |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) { | 137 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) { |
146 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _)); | 138 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _)); |
147 | 139 |
148 test_network_connection_handler_->CallTetherDisconnect( | 140 test_network_connection_handler_->CallTetherDisconnect( |
149 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback()); | 141 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback()); |
150 } | 142 } |
151 | 143 |
152 } // namespace tether | 144 } // namespace tether |
153 | 145 |
154 } // namespace chromeos | 146 } // namespace chromeos |
OLD | NEW |