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
parent fa35c9c2
...@@ -1933,6 +1933,23 @@ class URLRequestTestFTP : public URLRequestTest { ...@@ -1933,6 +1933,23 @@ class URLRequestTestFTP : public URLRequestTest {
// static // static
scoped_refptr<FTPTestServer> URLRequestTestFTP::server_; 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) { TEST_F(URLRequestTestFTP, FTPGetTestAnonymous) {
ASSERT_TRUE(NULL != server_.get()); ASSERT_TRUE(NULL != server_.get());
FilePath app_path; FilePath app_path;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment