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

Unified Diff: remoting/host/it2me/it2me_native_messaging_host_unittest.cc

Issue 1458323002: Simplify It2Me host shutdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host_main.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/it2me/it2me_native_messaging_host_unittest.cc
diff --git a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
index 94861e4f95831b531bf616be66b74c99dee10dec..c36bd6131473e87514db2b246761bbd0bbd890f8 100644
--- a/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
+++ b/remoting/host/it2me/it2me_native_messaging_host_unittest.cc
@@ -134,7 +134,6 @@ void MockIt2MeHost::Disconnect() {
return;
}
- RunSetState(kDisconnecting);
RunSetState(kDisconnected);
}
@@ -379,11 +378,10 @@ void It2MeNativeMessagingHostTest::VerifyConnectResponses(int request_id) {
void It2MeNativeMessagingHostTest::VerifyDisconnectResponses(int request_id) {
bool disconnect_response_received = false;
- bool disconnecting_received = false;
bool disconnected_received = false;
- // We expect a total of 3 messages: 1 connectResponse and 2 hostStateChanged.
- for (int i = 0; i < 3; ++i) {
+ // We expect a total of 3 messages: 1 connectResponse and 1 hostStateChanged.
+ for (int i = 0; i < 2; ++i) {
scoped_ptr<base::DictionaryValue> response = ReadMessageFromOutputPipe();
ASSERT_TRUE(response);
@@ -397,12 +395,7 @@ void It2MeNativeMessagingHostTest::VerifyDisconnectResponses(int request_id) {
} else if (type == "hostStateChanged") {
std::string state;
ASSERT_TRUE(response->GetString("state", &state));
- if (state ==
- It2MeNativeMessagingHost::HostStateToString(kDisconnecting)) {
- EXPECT_FALSE(disconnecting_received);
- disconnecting_received = true;
- } else if (state ==
- It2MeNativeMessagingHost::HostStateToString(kDisconnected)) {
+ if (state == It2MeNativeMessagingHost::HostStateToString(kDisconnected)) {
EXPECT_FALSE(disconnected_received);
disconnected_received = true;
} else {
« no previous file with comments | « remoting/host/it2me/it2me_native_messaging_host_main.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698