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

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

Issue 2792483002: [CrOS Tether] Create TetherConnector, which attempts to connect to a nearby tether host. (Closed)
Patch Set: hansberry@ comment. Created 3 years, 8 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/connect_tethering_operation_unittest.cc
diff --git a/chromeos/components/tether/connect_tethering_operation_unittest.cc b/chromeos/components/tether/connect_tethering_operation_unittest.cc
index b75c224639aa974bc1291c31fde92b14d00223f3..85f09ebfe3d0217bd9e36668ad67aa55a215838f 100644
--- a/chromeos/components/tether/connect_tethering_operation_unittest.cc
+++ b/chromeos/components/tether/connect_tethering_operation_unittest.cc
@@ -34,18 +34,23 @@ class TestObserver : public ConnectTetheringOperation::Observer {
TestObserver() : has_received_failure(false) {}
void OnSuccessfulConnectTetheringResponse(
+ const cryptauth::RemoteDevice& remote_device,
const std::string& ssid,
const std::string& password) override {
+ this->remote_device = remote_device;
this->ssid = ssid;
this->password = password;
}
void OnConnectTetheringFailure(
+ const cryptauth::RemoteDevice& remote_device,
ConnectTetheringResponse_ResponseCode error_code) override {
has_received_failure = true;
+ this->remote_device = remote_device;
this->error_code = error_code;
}
+ cryptauth::RemoteDevice remote_device;
std::string ssid;
std::string password;
@@ -152,6 +157,7 @@ class ConnectTetheringOperationTest : public testing::Test {
if (expected_response_code ==
ConnectTetheringResponse_ResponseCode::
ConnectTetheringResponse_ResponseCode_SUCCESS) {
+ EXPECT_EQ(test_device_, test_observer_->remote_device);
EXPECT_EQ(std::string(kTestSsid), test_observer_->ssid);
EXPECT_EQ(std::string(kTestPassword), test_observer_->password);
} else {

Powered by Google App Engine
This is Rietveld 408576698