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

Unified Diff: net/http/http_network_transaction_unittest.cc

Issue 159656: Include SSPI support for NTLM authentication. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: files moved Created 11 years, 4 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_handler_ntlm_win.cc ('k') | net/net.gyp » ('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 22897)
+++ net/http/http_network_transaction_unittest.cc (working copy)
@@ -23,6 +23,16 @@
//-----------------------------------------------------------------------------
+#if defined(NTLM_SSPI)
+// For NTLM implementation using SSPI, we ignore the NTLM tests since it is
+// not possible to predict the NTLM authorization headers.
+#define MAYBE_NTLMAuth1 DISABLED_NTLMAuth1
+#define MAYBE_NTLMAuth2 DISABLED_NTLMAuth2
+#elif defined(NTLM_PORTABLE)
+#define MAYBE_NTLMAuth1 NTLMAuth1
+#define MAYBE_NTLMAuth2 NTLMAuth2
+#endif
+
namespace net {
// Create a proxy service which fails on all requests (falls back to direct).
@@ -1450,12 +1460,13 @@
EXPECT_EQ(100, response->headers->GetContentLength());
}
+#if defined(NTLM_PORTABLE)
// The NTLM authentication unit tests were generated by capturing the HTTP
// requests and responses using Fiddler 2 and inspecting the generated random
// bytes in the debugger.
// Enter the correct password and authenticate successfully.
-TEST_F(HttpNetworkTransactionTest, NTLMAuth1) {
+TEST_F(HttpNetworkTransactionTest, MAYBE_NTLMAuth1) {
HttpAuthHandlerNTLM::ScopedProcSetter proc_setter(MockGenerateRandom1,
MockGetHostName);
SessionDependencies session_deps;
@@ -1578,7 +1589,7 @@
}
// Enter a wrong password, and then the correct one.
-TEST_F(HttpNetworkTransactionTest, NTLMAuth2) {
+TEST_F(HttpNetworkTransactionTest, MAYBE_NTLMAuth2) {
HttpAuthHandlerNTLM::ScopedProcSetter proc_setter(MockGenerateRandom2,
MockGetHostName);
SessionDependencies session_deps;
@@ -1778,6 +1789,7 @@
EXPECT_TRUE(response->auth_challenge.get() == NULL);
EXPECT_EQ(13, response->headers->GetContentLength());
}
+#endif
// Test reading a server response which has only headers, and no body.
// After some maximum number of bytes is consumed, the transaction should
« no previous file with comments | « net/http/http_auth_handler_ntlm_win.cc ('k') | net/net.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698