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

Unified Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 2836503002: Handle empty response to FTP QUIT message. (Closed)
Patch Set: 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
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ftp/ftp_network_transaction_unittest.cc
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index bf7b29e99ddf3f14ffd356f27590751b6d8c3683..7159c7697b4f113905c754430d1141ca5310746b 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -1705,6 +1705,15 @@ TEST_P(FtpNetworkTransactionTest, ExtraQuitResponses) {
ExecuteTransaction(&ctrl_socket, "ftp://host/", ERR_INVALID_RESPONSE);
}
+// Test case for https://crbug.com/633841 - similar to the ExtraQuitResponses
+// test case, but with an empty response.
+TEST_P(FtpNetworkTransactionTest, EmptyQuitResponse) {
+ FtpSocketDataProviderDirectoryListing ctrl_socket;
+ ctrl_socket.InjectFailure(FtpSocketDataProvider::PRE_QUIT,
+ FtpSocketDataProvider::QUIT, "");
+ ExecuteTransaction(&ctrl_socket, "ftp://host/", OK);
+}
+
TEST_P(FtpNetworkTransactionTest, InvalidRemoteDirectory) {
FtpSocketDataProviderFileDownload ctrl_socket;
TransactionFailHelper(
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698