| Index: net/http/http_auth_unittest.cc
|
| diff --git a/net/http/http_auth_unittest.cc b/net/http/http_auth_unittest.cc
|
| index e70cb0da9ca9fc02abf2daa24b8f75ba26271896..4c264f2c52a595ce489e8e4b2ab5614c2516e6ee 100644
|
| --- a/net/http/http_auth_unittest.cc
|
| +++ b/net/http/http_auth_unittest.cc
|
| @@ -49,7 +49,7 @@ HttpAuth::AuthorizationResult HandleChallengeResponse(
|
| std::string* challenge_used) {
|
| scoped_ptr<HttpAuthHandlerMock> mock_handler(
|
| CreateMockHandler(connection_based));
|
| - std::set<HttpAuth::Scheme> disabled_schemes;
|
| + std::set<std::string> disabled_schemes;
|
| scoped_refptr<HttpResponseHeaders> headers(
|
| HeadersFromResponseText(headers_text));
|
| return HttpAuth::HandleChallengeResponse(
|
| @@ -65,7 +65,7 @@ HttpAuth::AuthorizationResult HandleChallengeResponse(
|
| TEST(HttpAuthTest, ChooseBestChallenge) {
|
| static const struct {
|
| const char* headers;
|
| - HttpAuth::Scheme challenge_scheme;
|
| + const char* challenge_scheme;
|
| const char* challenge_realm;
|
| } tests[] = {
|
| {
|
| @@ -73,7 +73,7 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| "Y: Digest realm=\"X\", nonce=\"aaaaaaaaaa\"\n"
|
| "www-authenticate: Basic realm=\"BasicRealm\"\n",
|
|
|
| - HttpAuth::AUTH_SCHEME_BASIC,
|
| + "basic",
|
| "BasicRealm",
|
| },
|
| {
|
| @@ -81,7 +81,7 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| "Y: Digest realm=\"FooBar\", nonce=\"aaaaaaaaaa\"\n"
|
| "www-authenticate: Fake realm=\"FooBar\"\n",
|
|
|
| - HttpAuth::AUTH_SCHEME_MAX,
|
| + "",
|
| "",
|
| },
|
| {
|
| @@ -91,7 +91,7 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| "www-authenticate: nonce=\"aaaaaaaaaa\"\n"
|
| "www-authenticate: Digest realm=\"DigestRealm\", nonce=\"aaaaaaaaaa\"\n",
|
|
|
| - HttpAuth::AUTH_SCHEME_DIGEST,
|
| + "digest",
|
| "DigestRealm",
|
| },
|
| {
|
| @@ -99,7 +99,7 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| "Y: Digest realm=\"X\", nonce=\"aaaaaaaaaa\"\n"
|
| "www-authenticate:\n",
|
|
|
| - HttpAuth::AUTH_SCHEME_MAX,
|
| + "",
|
| "",
|
| },
|
| {
|
| @@ -111,16 +111,16 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| // TODO(ahendrickson): This may be flaky on Linux and OSX as it
|
| // relies on being able to load one of the known .so files
|
| // for gssapi.
|
| - HttpAuth::AUTH_SCHEME_NEGOTIATE,
|
| + "negotiate",
|
| #else
|
| // On systems that don't use Kerberos fall back to NTLM.
|
| - HttpAuth::AUTH_SCHEME_NTLM,
|
| + "ntlm",
|
| #endif // defined(USE_KERBEROS)
|
| "",
|
| }
|
| };
|
| GURL origin("http://www.example.com");
|
| - std::set<HttpAuth::Scheme> disabled_schemes;
|
| + std::set<std::string> disabled_schemes;
|
| MockAllowURLSecurityManager url_security_manager;
|
| scoped_ptr<HostResolver> host_resolver(new MockHostResolver());
|
| scoped_ptr<HttpAuthHandlerRegistryFactory> http_auth_handler_factory(
|
| @@ -145,10 +145,10 @@ TEST(HttpAuthTest, ChooseBestChallenge) {
|
| &handler);
|
|
|
| if (handler.get()) {
|
| - EXPECT_EQ(tests[i].challenge_scheme, handler->auth_scheme());
|
| + EXPECT_STREQ(tests[i].challenge_scheme, handler->auth_scheme().c_str());
|
| EXPECT_STREQ(tests[i].challenge_realm, handler->realm().c_str());
|
| } else {
|
| - EXPECT_EQ(HttpAuth::AUTH_SCHEME_MAX, tests[i].challenge_scheme);
|
| + EXPECT_STREQ("", tests[i].challenge_scheme);
|
| EXPECT_STREQ("", tests[i].challenge_realm);
|
| }
|
| }
|
|
|