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

Unified Diff: net/http/http_auth_handler_negotiate_unittest.cc

Issue 3055001: Use different separators for service-type and service-name in Kerberos SPN. (Closed)
Patch Set: Created 10 years, 5 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_negotiate.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_negotiate_unittest.cc
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index 59f615558c1ac6cca5b179d34344e2dbc11ea512..7acdec6a4d4149f069902e7550020cdcb04f06e6 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -170,7 +170,11 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCname) {
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password,
&request_info,
&callback, &token));
+#if defined(OS_WIN)
EXPECT_EQ(L"HTTP/alias", auth_handler->spn());
+#elif defined(OS_POSIX)
+ EXPECT_EQ(L"HTTP@alias", auth_handler->spn());
+#endif
}
TEST(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
@@ -188,7 +192,11 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password,
&request_info,
&callback, &token));
+#if defined(OS_WIN)
EXPECT_EQ(L"HTTP/alias", auth_handler->spn());
+#elif defined(OS_POSIX)
+ EXPECT_EQ(L"HTTP@alias", auth_handler->spn());
+#endif
}
TEST(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
@@ -206,7 +214,11 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password,
&request_info,
&callback, &token));
+#if defined(OS_WIN)
EXPECT_EQ(L"HTTP/alias:500", auth_handler->spn());
+#elif defined(OS_POSIX)
+ EXPECT_EQ(L"HTTP@alias:500", auth_handler->spn());
+#endif
}
TEST(HttpAuthHandlerNegotiateTest, CnameSync) {
@@ -224,7 +236,11 @@ TEST(HttpAuthHandlerNegotiateTest, CnameSync) {
EXPECT_EQ(OK, auth_handler->GenerateAuthToken(&username, &password,
&request_info,
&callback, &token));
+#if defined(OS_WIN)
EXPECT_EQ(L"HTTP/canonical.example.com", auth_handler->spn());
+#elif defined(OS_POSIX)
+ EXPECT_EQ(L"HTTP@canonical.example.com", auth_handler->spn());
+#endif
}
TEST(HttpAuthHandlerNegotiateTest, CnameAsync) {
@@ -242,7 +258,11 @@ TEST(HttpAuthHandlerNegotiateTest, CnameAsync) {
EXPECT_EQ(ERR_IO_PENDING, auth_handler->GenerateAuthToken(
&username, &password, &request_info, &callback, &token));
EXPECT_EQ(OK, callback.WaitForResult());
+#if defined(OS_WIN)
EXPECT_EQ(L"HTTP/canonical.example.com", auth_handler->spn());
+#elif defined(OS_POSIX)
+ EXPECT_EQ(L"HTTP@canonical.example.com", auth_handler->spn());
+#endif
}
} // namespace net
« no previous file with comments | « net/http/http_auth_handler_negotiate.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698