| OLD | NEW |
| (Empty) | |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_NETWORK_MOCK_NETWORK_DEVICE_HANDLER_H_ |
| 6 #define CHROMEOS_NETWORK_MOCK_NETWORK_DEVICE_HANDLER_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "base/callback.h" |
| 11 #include "base/macros.h" |
| 12 #include "base/values.h" |
| 13 #include "chromeos/chromeos_export.h" |
| 14 #include "chromeos/network/network_device_handler.h" |
| 15 #include "chromeos/network/network_handler_callbacks.h" |
| 16 #include "net/base/ip_endpoint.h" |
| 17 #include "testing/gmock/include/gmock/gmock.h" |
| 18 |
| 19 namespace chromeos { |
| 20 |
| 21 class CHROMEOS_EXPORT MockNetworkDeviceHandler : public NetworkDeviceHandler { |
| 22 public: |
| 23 MockNetworkDeviceHandler(); |
| 24 virtual ~MockNetworkDeviceHandler(); |
| 25 |
| 26 MOCK_CONST_METHOD3( |
| 27 GetDeviceProperties, |
| 28 void(const std::string& device_path, |
| 29 const network_handler::DictionaryResultCallback& callback, |
| 30 const network_handler::ErrorCallback& error_callback)); |
| 31 |
| 32 MOCK_METHOD5(SetDeviceProperty, |
| 33 void(const std::string& device_path, |
| 34 const std::string& property_name, |
| 35 const base::Value& value, |
| 36 const base::Closure& callback, |
| 37 const network_handler::ErrorCallback& error_callback)); |
| 38 |
| 39 MOCK_METHOD3(RequestRefreshIPConfigs, |
| 40 void(const std::string& device_path, |
| 41 const base::Closure& callback, |
| 42 const network_handler::ErrorCallback& error_callback)); |
| 43 |
| 44 MOCK_METHOD3(ProposeScan, |
| 45 void(const std::string& device_path, |
| 46 const base::Closure& callback, |
| 47 const network_handler::ErrorCallback& error_callback)); |
| 48 |
| 49 MOCK_METHOD4(RegisterCellularNetwork, |
| 50 void(const std::string& device_path, |
| 51 const std::string& network_id, |
| 52 const base::Closure& callback, |
| 53 const network_handler::ErrorCallback& error_callback)); |
| 54 |
| 55 MOCK_METHOD4(SetCarrier, |
| 56 void(const std::string& device_path, |
| 57 const std::string& carrier, |
| 58 const base::Closure& callback, |
| 59 const network_handler::ErrorCallback& error_callback)); |
| 60 |
| 61 MOCK_METHOD5(RequirePin, |
| 62 void(const std::string& device_path, |
| 63 bool require_pin, |
| 64 const std::string& pin, |
| 65 const base::Closure& callback, |
| 66 const network_handler::ErrorCallback& error_callback)); |
| 67 |
| 68 MOCK_METHOD4(EnterPin, |
| 69 void(const std::string& device_path, |
| 70 const std::string& pin, |
| 71 const base::Closure& callback, |
| 72 const network_handler::ErrorCallback& error_callback)); |
| 73 |
| 74 MOCK_METHOD5(UnblockPin, |
| 75 void(const std::string& device_path, |
| 76 const std::string& puk, |
| 77 const std::string& new_pin, |
| 78 const base::Closure& callback, |
| 79 const network_handler::ErrorCallback& error_callback)); |
| 80 |
| 81 MOCK_METHOD5(ChangePin, |
| 82 void(const std::string& device_path, |
| 83 const std::string& old_pin, |
| 84 const std::string& new_pin, |
| 85 const base::Closure& callback, |
| 86 const network_handler::ErrorCallback& error_callback)); |
| 87 |
| 88 MOCK_METHOD1(SetCellularAllowRoaming, void(bool allow_roaming)); |
| 89 |
| 90 MOCK_METHOD4(SetWifiTDLSEnabled, |
| 91 void(const std::string& ip_or_mac_address, |
| 92 bool enabled, |
| 93 const network_handler::StringResultCallback& callback, |
| 94 const network_handler::ErrorCallback& error_callback)); |
| 95 |
| 96 MOCK_METHOD3(GetWifiTDLSStatus, |
| 97 void(const std::string& ip_or_mac_address, |
| 98 const network_handler::StringResultCallback& callback, |
| 99 const network_handler::ErrorCallback& error_callback)); |
| 100 |
| 101 MOCK_METHOD3(AddWifiWakeOnPacketConnection, |
| 102 void(const net::IPEndPoint& ip_endpoint, |
| 103 const base::Closure& callback, |
| 104 const network_handler::ErrorCallback& error_callback)); |
| 105 |
| 106 MOCK_METHOD3(RemoveWifiWakeOnPacketConnection, |
| 107 void(const net::IPEndPoint& ip_endpoint, |
| 108 const base::Closure& callback, |
| 109 const network_handler::ErrorCallback& error_callback)); |
| 110 |
| 111 MOCK_METHOD2(RemoveAllWifiWakeOnPacketConnections, |
| 112 void(const base::Closure& callback, |
| 113 const network_handler::ErrorCallback& error_callback)); |
| 114 |
| 115 private: |
| 116 DISALLOW_COPY_AND_ASSIGN(MockNetworkDeviceHandler); |
| 117 }; |
| 118 |
| 119 } // namespace chromeos |
| 120 |
| 121 #endif // CHROMEOS_NETWORK_MOCK_NETWORK_DEVICE_HANDLER_H_ |
| OLD | NEW |