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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 3360017: Fix multi-round authentication.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: SocketStream fix Created 10 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 | « net/http/http_auth_unittest.cc ('k') | net/http/mock_sspi_library_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction_unittest.cc
===================================================================
--- net/http/http_network_transaction_unittest.cc (revision 59119)
+++ net/http/http_network_transaction_unittest.cc (working copy)
@@ -6654,6 +6654,8 @@
kGetAuth,
// Third round
kGetAuth,
+ // Fourth round
+ kGetAuth
};
MockRead reads[] = {
// First round
@@ -6661,6 +6663,8 @@
// Second round
kServerChallenge,
// Third round
+ kServerChallenge,
+ // Fourth round
kSuccess,
};
StaticSocketDataProvider data_provider(reads, arraysize(reads),
@@ -6696,6 +6700,16 @@
response = trans->GetResponseInfo();
ASSERT_FALSE(response == NULL);
EXPECT_TRUE(response->auth_challenge.get() == NULL);
+
+ // Fourth round
+ auth_handler->SetGenerateExpectation(false, OK);
+ rv = trans->RestartWithAuth(string16(), string16(), &callback);
+ if (rv == ERR_IO_PENDING)
+ rv = callback.WaitForResult();
+ EXPECT_EQ(OK, rv);
+ response = trans->GetResponseInfo();
+ ASSERT_FALSE(response == NULL);
+ EXPECT_TRUE(response->auth_challenge.get() == NULL);
}
class TLSDecompressionFailureSocketDataProvider : public SocketDataProvider {
« no previous file with comments | « net/http/http_auth_unittest.cc ('k') | net/http/mock_sspi_library_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698