OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CHROMEOS_COMPONENTS_TETHER_PROTO_TEST_UTIL_H_ |
| 6 #define CHROMEOS_COMPONENTS_TETHER_PROTO_TEST_UTIL_H_ |
| 7 |
| 8 #include "chromeos/components/tether/proto/tether.pb.h" |
| 9 |
| 10 namespace chromeos { |
| 11 |
| 12 namespace tether { |
| 13 |
| 14 namespace proto_test_util { |
| 15 |
| 16 // Pass these constants to CreateTestDeviceStatus() to create a proto object |
| 17 // which does not have the associated field set. |
| 18 const char kDoNotSetStringField[] = "doNotSetField"; |
| 19 const int kDoNotSetIntField = -100; |
| 20 |
| 21 } // namespace proto_test_util |
| 22 |
| 23 // Creates a DeviceStatus object using the parameters provided. If |
| 24 // |kDoNotSetStringField| or |kDoNotSetIntField| are passed, these fields will |
| 25 // not be set in the output. |
| 26 DeviceStatus CreateTestDeviceStatus(const std::string& cell_provider_name, |
| 27 int battery_percentage, |
| 28 int connection_strength); |
| 29 |
| 30 // Creates a DeviceStatus object using fake field values. |
| 31 DeviceStatus CreateDeviceStatusWithFakeFields(); |
| 32 |
| 33 } // namespace tether |
| 34 |
| 35 } // namespace chromeos |
| 36 |
| 37 #endif // CHROMEOS_COMPONENTS_TETHER_PROTO_TEST_UTIL_H_ |
OLD | NEW |