summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 18:27:02 +0000
committerinferno@chromium.org <inferno@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-03-22 18:27:02 +0000
commit23055d9c157a96eea2c95de19eb4d6505658dfba (patch)
treeea019a8e14c859b8cd977afbd78b24ce0ebffc84
parent3506d7baa89a1552666e14d425d68371fd97c9fc (diff)
downloadchromium_src-23055d9c157a96eea2c95de19eb4d6505658dfba.zip
chromium_src-23055d9c157a96eea2c95de19eb4d6505658dfba.tar.gz
chromium_src-23055d9c157a96eea2c95de19eb4d6505658dfba.tar.bz2
Add unit test to check for zero length dir in FTP PWD response.
BUG=38845 TEST=FtpNetworkTransactionTest.ZeroLengthDirInPWD Review URL: http://codereview.chromium.org/1166001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@42238 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--net/ftp/ftp_network_transaction_unittest.cc11
1 files changed, 11 insertions, 0 deletions
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 1c7ca57..bb9e132 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -1127,4 +1127,15 @@ TEST_F(FtpNetworkTransactionTest, DownloadTransactionFileNotFound) {
ERR_FILE_NOT_FOUND);
}
+// Test for http://crbug.com/38845.
+TEST_F(FtpNetworkTransactionTest, ZeroLengthDirInPWD) {
+ FtpSocketDataProviderFileDownload ctrl_socket;
+ TransactionFailHelper(&ctrl_socket,
+ "ftp://host/file",
+ FtpSocketDataProvider::PRE_PWD,
+ FtpSocketDataProvider::PRE_TYPE,
+ "257 \"\"\r\n",
+ OK);
+}
+
} // namespace net