OLD | NEW |
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/initializer.h" | 5 #include "chromeos/components/tether/initializer.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/message_loop/message_loop.h" | 10 #include "base/message_loop/message_loop.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 void(const std::string&, const base::DictionaryValue&, bool)); | 82 void(const std::string&, const base::DictionaryValue&, bool)); |
83 MOCK_METHOD2(CreateConfigurationAndConnect, | 83 MOCK_METHOD2(CreateConfigurationAndConnect, |
84 void(base::DictionaryValue*, bool)); | 84 void(base::DictionaryValue*, bool)); |
85 MOCK_METHOD2(CreateConfiguration, void(base::DictionaryValue*, bool)); | 85 MOCK_METHOD2(CreateConfiguration, void(base::DictionaryValue*, bool)); |
86 }; | 86 }; |
87 | 87 |
88 class TestNetworkConnectionHandler : public NetworkConnectionHandler { | 88 class TestNetworkConnectionHandler : public NetworkConnectionHandler { |
89 public: | 89 public: |
90 TestNetworkConnectionHandler() : NetworkConnectionHandler() {} | 90 TestNetworkConnectionHandler() : NetworkConnectionHandler() {} |
91 ~TestNetworkConnectionHandler() override {} | 91 ~TestNetworkConnectionHandler() override {} |
| 92 |
| 93 // NetworkConnectionHandler: |
| 94 void ConnectToNetwork(const std::string& service_path, |
| 95 const base::Closure& success_callback, |
| 96 const network_handler::ErrorCallback& error_callback, |
| 97 bool check_error_state) override {} |
| 98 |
| 99 void DisconnectNetwork( |
| 100 const std::string& service_path, |
| 101 const base::Closure& success_callback, |
| 102 const network_handler::ErrorCallback& error_callback) override {} |
| 103 |
| 104 bool HasConnectingNetwork(const std::string& service_path) override { |
| 105 return false; |
| 106 } |
| 107 |
| 108 bool HasPendingConnectRequest() override { return false; } |
| 109 |
| 110 void Init(NetworkStateHandler* network_state_handler, |
| 111 NetworkConfigurationHandler* network_configuration_handler, |
| 112 ManagedNetworkConfigurationHandler* |
| 113 managed_network_configuration_handler) override {} |
92 }; | 114 }; |
93 | 115 |
94 } // namespace | 116 } // namespace |
95 | 117 |
96 class InitializerTest : public NetworkStateTest { | 118 class InitializerTest : public NetworkStateTest { |
97 protected: | 119 protected: |
98 InitializerTest() : NetworkStateTest() {} | 120 InitializerTest() : NetworkStateTest() {} |
99 ~InitializerTest() override {} | 121 ~InitializerTest() override {} |
100 | 122 |
101 void SetUp() override { | 123 void SetUp() override { |
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 fake_cryptauth_service.get(), | 212 fake_cryptauth_service.get(), |
191 base::MakeUnique<FakeNotificationPresenter>(), test_pref_service_.get(), | 213 base::MakeUnique<FakeNotificationPresenter>(), test_pref_service_.get(), |
192 fake_token_service.get(), network_state_handler(), | 214 fake_token_service.get(), network_state_handler(), |
193 managed_network_configuration_handler.get(), mock_network_connect.get(), | 215 managed_network_configuration_handler.get(), mock_network_connect.get(), |
194 network_connection_handler_.get(), mock_adapter); | 216 network_connection_handler_.get(), mock_adapter); |
195 } | 217 } |
196 | 218 |
197 } // namespace tether | 219 } // namespace tether |
198 | 220 |
199 } // namespace chromeos | 221 } // namespace chromeos |
OLD | NEW |