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

Unified Diff: net/ftp/ftp_network_transaction_unittest.cc

Issue 8340026: Use AuthCredentials throughout the network stack instead of username/password. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: mac compile fix Created 9 years, 2 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
Index: net/ftp/ftp_network_transaction_unittest.cc
diff --git a/net/ftp/ftp_network_transaction_unittest.cc b/net/ftp/ftp_network_transaction_unittest.cc
index 6739847b552f587271ec3167c5c66c034fda6df2..5d686e00c40bf4076a7fa3277f87a6b4050af255 100644
--- a/net/ftp/ftp_network_transaction_unittest.cc
+++ b/net/ftp/ftp_network_transaction_unittest.cc
@@ -1190,9 +1190,11 @@ TEST_F(FtpNetworkTransactionTest, EvilRestartUser) {
ctrl_writes, arraysize(ctrl_writes));
mock_socket_factory_.AddSocketDataProvider(&ctrl_socket2);
ASSERT_EQ(ERR_IO_PENDING,
- transaction_.RestartWithAuth(ASCIIToUTF16("foo\nownz0red"),
- ASCIIToUTF16("innocent"),
- &callback_));
+ transaction_.RestartWithAuth(
+ AuthCredentials(
+ ASCIIToUTF16("foo\nownz0red"),
+ ASCIIToUTF16("innocent")),
+ &callback_));
EXPECT_EQ(ERR_MALFORMED_IDENTITY, callback_.WaitForResult());
}
@@ -1223,9 +1225,10 @@ TEST_F(FtpNetworkTransactionTest, EvilRestartPassword) {
ctrl_writes, arraysize(ctrl_writes));
mock_socket_factory_.AddSocketDataProvider(&ctrl_socket2);
ASSERT_EQ(ERR_IO_PENDING,
- transaction_.RestartWithAuth(ASCIIToUTF16("innocent"),
- ASCIIToUTF16("foo\nownz0red"),
- &callback_));
+ transaction_.RestartWithAuth(
+ AuthCredentials(ASCIIToUTF16("innocent"),
+ ASCIIToUTF16("foo\nownz0red")),
+ &callback_));
EXPECT_EQ(ERR_MALFORMED_IDENTITY, callback_.WaitForResult());
}

Powered by Google App Engine
This is Rietveld 408576698