summaryrefslogtreecommitdiffstats
path: root/net/url_request
diff options
context:
space:
mode:
authorphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 17:05:37 +0000
committerphajdan.jr@chromium.org <phajdan.jr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-09 17:05:37 +0000
commita25e90e8724d4c0dd942ec616295edbdc6cee892 (patch)
treee3c9f1d3827af28ff9c61adb8edacc408752117a /net/url_request
parentfa35c9c28bda4a9dcbe6ce5eb9533be87b74fbd6 (diff)
downloadchromium_src-a25e90e8724d4c0dd942ec616295edbdc6cee892.zip
chromium_src-a25e90e8724d4c0dd942ec616295edbdc6cee892.tar.gz
chromium_src-a25e90e8724d4c0dd942ec616295edbdc6cee892.tar.bz2
Add a unit test for FTP directory listing.
TEST=Covered by net_unittests. BUG=none Review URL: http://codereview.chromium.org/197052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25740 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/url_request')
-rw-r--r--net/url_request/url_request_unittest.cc17
1 files changed, 17 insertions, 0 deletions
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index 6ceebc0..d18ffeb 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -1933,6 +1933,23 @@ class URLRequestTestFTP : public URLRequestTest {
// static
scoped_refptr<FTPTestServer> URLRequestTestFTP::server_;
+TEST_F(URLRequestTestFTP, FTPDirectoryListing) {
+ ASSERT_TRUE(NULL != server_.get());
+ TestDelegate d;
+ {
+ TestURLRequest r(server_->TestServerPage("/"), &d);
+ r.Start();
+ EXPECT_TRUE(r.is_pending());
+
+ MessageLoop::current()->Run();
+
+ EXPECT_FALSE(r.is_pending());
+ EXPECT_EQ(1, d.response_started_count());
+ EXPECT_FALSE(d.received_data_before_response());
+ EXPECT_LT(0, d.bytes_received());
+ }
+}
+
TEST_F(URLRequestTestFTP, FTPGetTestAnonymous) {
ASSERT_TRUE(NULL != server_.get());
FilePath app_path;