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

Side by Side Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 2538773002: Fix yet another silly DCHECK in the FTP code. (Closed)
Patch Set: Created 4 years 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 unified diff | Download patch
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « net/ftp/ftp_network_transaction.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698