| 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/macros.h" | 10 #include "base/macros.h" |
| (...skipping 1774 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1785 TEST_P(FtpNetworkTransactionTest, ExtraQuitResponses) { | 1785 TEST_P(FtpNetworkTransactionTest, ExtraQuitResponses) { |
| 1786 FtpSocketDataProviderDirectoryListing ctrl_socket; | 1786 FtpSocketDataProviderDirectoryListing ctrl_socket; |
| 1787 ctrl_socket.InjectFailure(FtpSocketDataProvider::PRE_QUIT, | 1787 ctrl_socket.InjectFailure(FtpSocketDataProvider::PRE_QUIT, |
| 1788 FtpSocketDataProvider::QUIT, | 1788 FtpSocketDataProvider::QUIT, |
| 1789 "221 Foo\r\n" | 1789 "221 Foo\r\n" |
| 1790 "221 Bar\r\n" | 1790 "221 Bar\r\n" |
| 1791 "221 Trombones\r\n"); | 1791 "221 Trombones\r\n"); |
| 1792 ExecuteTransaction(&ctrl_socket, "ftp://host/", ERR_INVALID_RESPONSE); | 1792 ExecuteTransaction(&ctrl_socket, "ftp://host/", ERR_INVALID_RESPONSE); |
| 1793 } | 1793 } |
| 1794 | 1794 |
| 1795 TEST_P(FtpNetworkTransactionTest, InvalidRemoteDirectory) { |
| 1796 FtpSocketDataProviderFileDownload ctrl_socket; |
| 1797 TransactionFailHelper( |
| 1798 &ctrl_socket, "ftp://host/file", FtpSocketDataProvider::PRE_PWD, |
| 1799 FtpSocketDataProvider::PRE_QUIT, |
| 1800 "257 \"foo\rbar\" is your current location\r\n", ERR_INVALID_RESPONSE); |
| 1801 } |
| 1802 |
| 1803 TEST_P(FtpNetworkTransactionTest, InvalidRemoteDirectory2) { |
| 1804 FtpSocketDataProviderFileDownload ctrl_socket; |
| 1805 TransactionFailHelper( |
| 1806 &ctrl_socket, "ftp://host/file", FtpSocketDataProvider::PRE_PWD, |
| 1807 FtpSocketDataProvider::PRE_QUIT, |
| 1808 "257 \"foo\nbar\" is your current location\r\n", ERR_INVALID_RESPONSE); |
| 1809 } |
| 1810 |
| 1795 INSTANTIATE_TEST_CASE_P(FTP, | 1811 INSTANTIATE_TEST_CASE_P(FTP, |
| 1796 FtpNetworkTransactionTest, | 1812 FtpNetworkTransactionTest, |
| 1797 ::testing::Values(AF_INET, AF_INET6)); | 1813 ::testing::Values(AF_INET, AF_INET6)); |
| 1798 | 1814 |
| 1799 } // namespace net | 1815 } // namespace net |
| OLD | NEW |