Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "net/ftp/ftp_network_transaction.h" | 5 #include "net/ftp/ftp_network_transaction.h" |
| 6 | 6 |
| 7 #include "build/build_config.h" | 7 #include "build/build_config.h" |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 900 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 911 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionWithPasvFallback) { | 911 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionWithPasvFallback) { |
| 912 FtpSocketDataProviderDirectoryListingWithPasvFallback ctrl_socket; | 912 FtpSocketDataProviderDirectoryListingWithPasvFallback ctrl_socket; |
| 913 ExecuteTransaction(&ctrl_socket, "ftp://host", OK); | 913 ExecuteTransaction(&ctrl_socket, "ftp://host", OK); |
| 914 | 914 |
| 915 EXPECT_TRUE(transaction_.GetResponseInfo()->is_directory_listing); | 915 EXPECT_TRUE(transaction_.GetResponseInfo()->is_directory_listing); |
| 916 EXPECT_EQ(-1, transaction_.GetResponseInfo()->expected_content_size); | 916 EXPECT_EQ(-1, transaction_.GetResponseInfo()->expected_content_size); |
| 917 } | 917 } |
| 918 | 918 |
| 919 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionWithTypecode) { | 919 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionWithTypecode) { |
| 920 FtpSocketDataProviderDirectoryListing ctrl_socket; | 920 FtpSocketDataProviderDirectoryListing ctrl_socket; |
| 921 ExecuteTransaction(&ctrl_socket, "ftp://host;type=d", OK); | 921 ExecuteTransaction(&ctrl_socket, "ftp://host/;type=d", OK); |
|
xunjieli
2015/01/30 21:50:44
Added a "/" here so that ";type=d" will not be int
davidben
2015/02/04 18:51:18
Hah. Did this test just never actually test the ty
xunjieli
2015/02/04 20:29:29
Yep. It was not tested before since "host;type=d"
| |
| 922 | 922 |
| 923 EXPECT_TRUE(transaction_.GetResponseInfo()->is_directory_listing); | 923 EXPECT_TRUE(transaction_.GetResponseInfo()->is_directory_listing); |
| 924 EXPECT_EQ(-1, transaction_.GetResponseInfo()->expected_content_size); | 924 EXPECT_EQ(-1, transaction_.GetResponseInfo()->expected_content_size); |
| 925 } | 925 } |
| 926 | 926 |
| 927 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionMultilineWelcome) { | 927 TEST_P(FtpNetworkTransactionTest, DirectoryTransactionMultilineWelcome) { |
| 928 FtpSocketDataProviderDirectoryListing ctrl_socket; | 928 FtpSocketDataProviderDirectoryListing ctrl_socket; |
| 929 ctrl_socket.set_multiline_welcome(true); | 929 ctrl_socket.set_multiline_welcome(true); |
| 930 ExecuteTransaction(&ctrl_socket, "ftp://host", OK); | 930 ExecuteTransaction(&ctrl_socket, "ftp://host", OK); |
| 931 } | 931 } |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1570 FtpSocketDataProvider::PRE_TYPE, | 1570 FtpSocketDataProvider::PRE_TYPE, |
| 1571 "257 \"\"\r\n", | 1571 "257 \"\"\r\n", |
| 1572 OK); | 1572 OK); |
| 1573 } | 1573 } |
| 1574 | 1574 |
| 1575 INSTANTIATE_TEST_CASE_P(FTP, | 1575 INSTANTIATE_TEST_CASE_P(FTP, |
| 1576 FtpNetworkTransactionTest, | 1576 FtpNetworkTransactionTest, |
| 1577 ::testing::Values(AF_INET, AF_INET6)); | 1577 ::testing::Values(AF_INET, AF_INET6)); |
| 1578 | 1578 |
| 1579 } // namespace net | 1579 } // namespace net |
| OLD | NEW |