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

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

Issue 2926503002: [CrOS Tether] Create proto_test_util.cc/h and move CreateTestDeviceStatus() there. (Closed)
Patch Set: Included missing dep. 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/host_scanner_operation_unittest.cc
diff --git a/chromeos/components/tether/host_scanner_operation_unittest.cc b/chromeos/components/tether/host_scanner_operation_unittest.cc
index b0690bb1f13b1384428bee93f406e68b2445f78d..81b8a29671ba1269687df580f59135ae3b5c5bd3 100644
--- a/chromeos/components/tether/host_scanner_operation_unittest.cc
+++ b/chromeos/components/tether/host_scanner_operation_unittest.cc
@@ -15,6 +15,7 @@
#include "chromeos/components/tether/mock_host_scan_device_prioritizer.h"
#include "chromeos/components/tether/mock_tether_host_response_recorder.h"
#include "chromeos/components/tether/proto/tether.pb.h"
+#include "chromeos/components/tether/proto_test_util.h"
#include "components/cryptauth/remote_device_test_util.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -77,18 +78,8 @@ std::string CreateTetherAvailabilityRequestString() {
}
DeviceStatus CreateFakeDeviceStatus(std::string cell_provider_name) {
- 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(cell_provider_name);
- device_status.set_connection_strength(4);
- device_status.mutable_wifi_status()->CopyFrom(wifi_status);
-
- return device_status;
+ return CreateTestDeviceStatus(cell_provider_name, 75 /* battery_percentage */,
+ 4 /* connection_strength */);
}
std::string CreateTetherAvailabilityResponseString(
« no previous file with comments | « chromeos/components/tether/device_status_util_unittest.cc ('k') | chromeos/components/tether/host_scanner_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698