| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ | 6 #define CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ |
| 7 | 7 |
| 8 #include "third_party/cros/chromeos_network.h" | 8 #include "third_party/cros/chromeos_network.h" |
| 9 #include "testing/gmock/include/gmock/gmock.h" | 9 #include "testing/gmock/include/gmock/gmock.h" |
| 10 | 10 |
| 11 namespace chromeos { | 11 namespace chromeos { |
| 12 | 12 |
| 13 class MockChromeOSNetwork { | 13 class MockChromeOSNetwork { |
| 14 public: | 14 public: |
| 15 // Initializes the global instance and replaces the chromeos_network | 15 // Initializes the global instance and replaces the chromeos_network |
| 16 // functions with mocks. | 16 // functions with mocks. |
| 17 static void Initialize(); | 17 static void Initialize(); |
| 18 | 18 |
| 19 // Destroyes the global instance and resets the chromeos_network function. | 19 // Destroyes the global instance and resets the chromeos_network function. |
| 20 static void Shutdown(); | 20 static void Shutdown(); |
| 21 | 21 |
| 22 // Gets the global instance. | 22 // Gets the global instance. |
| 23 static MockChromeOSNetwork* Get(); | 23 static MockChromeOSNetwork* Get(); |
| 24 | 24 |
| 25 MOCK_METHOD2(ActivateCellularModem, bool(const char* service_path, |
| 26 const char* carrier)); |
| 25 MOCK_METHOD3(SetNetworkServicePropertyGValue, | 27 MOCK_METHOD3(SetNetworkServicePropertyGValue, |
| 26 void(const char* service_path, | 28 void(const char* service_path, |
| 27 const char* property, | 29 const char* property, |
| 28 const GValue* gvalue)); | 30 const GValue* gvalue)); |
| 29 MOCK_METHOD2(ClearNetworkServiceProperty, | 31 MOCK_METHOD2(ClearNetworkServiceProperty, |
| 30 void(const char* service_path, const char* property)); | 32 void(const char* service_path, const char* property)); |
| 31 MOCK_METHOD3(SetNetworkDevicePropertyGValue, | 33 MOCK_METHOD3(SetNetworkDevicePropertyGValue, |
| 32 void(const char* device_path, | 34 void(const char* device_path, |
| 33 const char* property, | 35 const char* property, |
| 34 const GValue* gvalue)); | 36 const GValue* gvalue)); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void* object)); | 111 void* object)); |
| 110 | 112 |
| 111 protected: | 113 protected: |
| 112 MockChromeOSNetwork(); | 114 MockChromeOSNetwork(); |
| 113 virtual ~MockChromeOSNetwork(); | 115 virtual ~MockChromeOSNetwork(); |
| 114 }; | 116 }; |
| 115 | 117 |
| 116 } // namespace chromeos | 118 } // namespace chromeos |
| 117 | 119 |
| 118 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ | 120 #endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_CHROMEOS_NETWORK_H_ |
| OLD | NEW |