| 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 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 66 | 66 |
| 67 class MockTetherConnector : public TetherConnector { | 67 class MockTetherConnector : public TetherConnector { |
| 68 public: | 68 public: |
| 69 MockTetherConnector() | 69 MockTetherConnector() |
| 70 : TetherConnector(nullptr /* network_state_handler */, | 70 : TetherConnector(nullptr /* network_state_handler */, |
| 71 nullptr /* wifi_hotspot_connector */, | 71 nullptr /* wifi_hotspot_connector */, |
| 72 nullptr /* active_host */, | 72 nullptr /* active_host */, |
| 73 nullptr /* tether_host_fetcher */, | 73 nullptr /* tether_host_fetcher */, |
| 74 nullptr /* connection_manager */, | 74 nullptr /* connection_manager */, |
| 75 nullptr /* tether_host_response_recorder */, | 75 nullptr /* tether_host_response_recorder */, |
| 76 nullptr /* device_id_tether_network_guid_map */) {} | 76 nullptr /* device_id_tether_network_guid_map */, |
| 77 nullptr /* host_scan_cache */, |
| 78 nullptr /* notification_presenter */) {} |
| 77 ~MockTetherConnector() override {} | 79 ~MockTetherConnector() override {} |
| 78 | 80 |
| 79 MOCK_METHOD3( | 81 MOCK_METHOD3( |
| 80 ConnectToNetwork, | 82 ConnectToNetwork, |
| 81 void(const std::string& tether_network_guid, | 83 void(const std::string& tether_network_guid, |
| 82 const base::Closure& success_callback, | 84 const base::Closure& success_callback, |
| 83 const network_handler::StringResultCallback& error_callback)); | 85 const network_handler::StringResultCallback& error_callback)); |
| 84 }; | 86 }; |
| 85 | 87 |
| 86 class MockTetherDisconnector : public TetherDisconnector { | 88 class MockTetherDisconnector : public TetherDisconnector { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 | 144 |
| 143 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) { | 145 TEST_F(NetworkConnectionHandlerTetherDelegateTest, TestDisconnect) { |
| 144 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _)); | 146 EXPECT_CALL(*mock_tether_disconnector_, DisconnectFromNetwork(_, _, _)); |
| 145 | 147 |
| 146 test_network_connection_handler_->CallTetherDisconnect( | 148 test_network_connection_handler_->CallTetherDisconnect( |
| 147 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback()); | 149 "tetherNetworkGuid", base::Closure(), network_handler::ErrorCallback()); |
| 148 } | 150 } |
| 149 | 151 |
| 150 } // namespace tether | 152 } // namespace tether |
| 151 | 153 |
| 152 } // namespace cryptauth | 154 } // namespace chromeos |
| OLD | NEW |