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

Unified Diff: net/url_request/url_request_unittest.cc

Issue 197052: Add a unit test for FTP directory listing. (Closed)
Patch Set: Created 11 years, 3 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/url_request/url_request_unittest.cc
diff --git a/net/url_request/url_request_unittest.cc b/net/url_request/url_request_unittest.cc
index bd5c8fae02269a1c9db6736678a49ceb7ddc28ba..6ea51d08f46f32311fb693c8841ee8462c737f2c 100644
--- a/net/url_request/url_request_unittest.cc
+++ b/net/url_request/url_request_unittest.cc
@@ -1949,6 +1949,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());
eroman 2009/09/08 23:39:41 this seems a bit odd to use LT. Can this be a dir
+ }
+}
+
TEST_F(URLRequestTestFTP, FTPGetTestAnonymous) {
ASSERT_TRUE(NULL != server_.get());
FilePath app_path;
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698