Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(61)

Unified Diff: chromeos/components/tether/message_wrapper_unittest.cc

Issue 2926503002: [CrOS Tether] Create proto_test_util.cc/h and move CreateTestDeviceStatus() there. (Closed)
Patch Set: Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chromeos/components/tether/message_wrapper_unittest.cc
diff --git a/chromeos/components/tether/message_wrapper_unittest.cc b/chromeos/components/tether/message_wrapper_unittest.cc
index 78a7e248a301d126473987240db4e389b722f14f..4c9524423a9ed10f00e99f0e7150f151d305c298 100644
--- a/chromeos/components/tether/message_wrapper_unittest.cc
+++ b/chromeos/components/tether/message_wrapper_unittest.cc
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "base/macros.h"
#include "chromeos/components/tether/proto/tether.pb.h"
+#include "chromeos/components/tether/proto_test_util.h"
#include "testing/gmock/include/gmock/gmock.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -20,18 +21,8 @@ namespace tether {
namespace {
DeviceStatus CreateFakeDeviceStatus() {
Ryan Hansberry 2017/06/05 22:52:23 This same method without any args is across about
Kyle Horimoto 2017/06/05 23:18:56 Done.
- WifiStatus wifi_status;
- wifi_status.set_status_code(
- WifiStatus_StatusCode::WifiStatus_StatusCode_CONNECTED);
- wifi_status.set_ssid("Google A");
-
- DeviceStatus device_status;
- device_status.set_battery_percentage(75);
- device_status.set_cell_provider("Google Fi");
- device_status.set_connection_strength(4);
- device_status.mutable_wifi_status()->CopyFrom(wifi_status);
-
- return device_status;
+ return CreateTestDeviceStatus("Google Fi", 75 /* battery_percentage */,
+ 4 /* connection_strength */);
}
TetherAvailabilityResponse CreateTetherAvailabilityResponse() {

Powered by Google App Engine
This is Rietveld 408576698