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

Unified Diff: net/http/http_auth_handler_factory_unittest.cc

Issue 3013003: Don't do Negotiate with GSSAPI if default credentials are not allowed. (Closed)
Patch Set: Remove anonymous namespace to make OSX build. 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 | « no previous file | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler_factory_unittest.cc
diff --git a/net/http/http_auth_handler_factory_unittest.cc b/net/http/http_auth_handler_factory_unittest.cc
index 526b62b7731529d19efe4fd4886872255fea248c..8dd37f0b47ed864bd24a6ab4ac50783c8e73f2e1 100644
--- a/net/http/http_auth_handler_factory_unittest.cc
+++ b/net/http/http_auth_handler_factory_unittest.cc
@@ -6,10 +6,13 @@
#include "net/base/net_errors.h"
#include "net/http/http_auth_handler.h"
#include "net/http/http_auth_handler_factory.h"
+#include "net/http/url_security_manager.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
+namespace {
+
class MockHttpAuthHandlerFactory : public HttpAuthHandlerFactory {
public:
explicit MockHttpAuthHandlerFactory(int return_code) :
@@ -31,6 +34,8 @@ class MockHttpAuthHandlerFactory : public HttpAuthHandlerFactory {
int return_code_;
};
+} // namespace
+
TEST(HttpAuthHandlerFactoryTest, RegistryFactory) {
HttpAuthHandlerRegistryFactory registry_factory;
GURL gurl("www.google.com");
@@ -90,9 +95,11 @@ TEST(HttpAuthHandlerFactoryTest, RegistryFactory) {
}
TEST(HttpAuthHandlerFactoryTest, DefaultFactory) {
- scoped_ptr<HttpAuthHandlerFactory> http_auth_handler_factory(
+ URLSecurityManagerAllow url_security_manager;
+ scoped_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
HttpAuthHandlerFactory::CreateDefault());
-
+ http_auth_handler_factory->SetURLSecurityManager(
+ "negotiate", &url_security_manager);
GURL server_origin("http://www.example.com");
GURL proxy_origin("http://cache.example.com:3128");
{
« no previous file with comments | « no previous file | net/http/http_auth_handler_negotiate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698