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

Side by Side Diff: net/http/http_auth_handler_factory_unittest.cc

Issue 1128043007: Support Kerberos on Android (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix a nit I had missed. Created 5 years, 6 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/scoped_ptr.h" 5 #include "base/memory/scoped_ptr.h"
6 #include "net/base/net_errors.h" 6 #include "net/base/net_errors.h"
7 #include "net/dns/mock_host_resolver.h" 7 #include "net/dns/mock_host_resolver.h"
8 #include "net/http/http_auth_handler.h" 8 #include "net/http/http_auth_handler.h"
9 #include "net/http/http_auth_handler_factory.h" 9 #include "net/http/http_auth_handler_factory.h"
10 #include "net/http/mock_allow_url_security_manager.h" 10 #include "net/http/mock_allow_url_security_manager.h"
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 EXPECT_TRUE(handler->is_connection_based()); 165 EXPECT_TRUE(handler->is_connection_based());
166 } 166 }
167 { 167 {
168 scoped_ptr<HttpAuthHandler> handler; 168 scoped_ptr<HttpAuthHandler> handler;
169 int rv = http_auth_handler_factory->CreateAuthHandlerFromString( 169 int rv = http_auth_handler_factory->CreateAuthHandlerFromString(
170 "Negotiate", 170 "Negotiate",
171 HttpAuth::AUTH_SERVER, 171 HttpAuth::AUTH_SERVER,
172 server_origin, 172 server_origin,
173 BoundNetLog(), 173 BoundNetLog(),
174 &handler); 174 &handler);
175 #if defined(USE_KERBEROS) 175 // Note the default factory doesn't support KERBOROS on Android
Bernhard Bauer 2015/06/10 17:11:03 Nit: KERBEROS
aberent 2015/06/15 15:52:20 Done.
176 #if defined(USE_KERBEROS) && !defined(OS_ANDROID)
176 EXPECT_EQ(OK, rv); 177 EXPECT_EQ(OK, rv);
177 ASSERT_FALSE(handler.get() == NULL); 178 ASSERT_FALSE(handler.get() == NULL);
178 EXPECT_EQ(HttpAuth::AUTH_SCHEME_NEGOTIATE, handler->auth_scheme()); 179 EXPECT_EQ(HttpAuth::AUTH_SCHEME_NEGOTIATE, handler->auth_scheme());
179 EXPECT_STREQ("", handler->realm().c_str()); 180 EXPECT_STREQ("", handler->realm().c_str());
180 EXPECT_EQ(HttpAuth::AUTH_SERVER, handler->target()); 181 EXPECT_EQ(HttpAuth::AUTH_SERVER, handler->target());
181 EXPECT_TRUE(handler->encrypts_identity()); 182 EXPECT_TRUE(handler->encrypts_identity());
182 EXPECT_TRUE(handler->is_connection_based()); 183 EXPECT_TRUE(handler->is_connection_based());
183 #else 184 #else
184 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, rv); 185 EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, rv);
185 EXPECT_TRUE(handler.get() == NULL); 186 EXPECT_TRUE(handler.get() == NULL);
186 #endif // defined(USE_KERBEROS) 187 #endif // defined(USE_KERBEROS) && !defined(OS_ANDROID)
187 } 188 }
188 } 189 }
189 190
190 } // namespace net 191 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698