diff options
author | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 06:46:23 +0000 |
---|---|---|
committer | ericroman@google.com <ericroman@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-08 06:46:23 +0000 |
commit | f9ee6b5a5925d8496f05309963c42bfdd3ec1a8b (patch) | |
tree | 7867cc64559bf86408da5a744e918d2861bf3889 /net/http/http_auth_handler_digest_unittest.cc | |
parent | f6028ee8661996ba41763a6601469ebd599480f5 (diff) | |
download | chromium_src-f9ee6b5a5925d8496f05309963c42bfdd3ec1a8b.zip chromium_src-f9ee6b5a5925d8496f05309963c42bfdd3ec1a8b.tar.gz chromium_src-f9ee6b5a5925d8496f05309963c42bfdd3ec1a8b.tar.bz2 |
- Add preemptive authorization (new http stack only)
- Check for auth identity in URL (new http stack only)
- Move auth cache logic out of url request job, and hide it in the url request ftp job and http transaction classes.
Note: Somehow the original codereview thread got corrupted so it was recreated.
The real review comments should be under (http://codereview.chromium.org/6481)
Review URL: http://codereview.chromium.org/8231
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5064 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_digest_unittest.cc')
-rw-r--r-- | net/http/http_auth_handler_digest_unittest.cc | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/net/http/http_auth_handler_digest_unittest.cc b/net/http/http_auth_handler_digest_unittest.cc index f15ecd0..bb21d8b 100644 --- a/net/http/http_auth_handler_digest_unittest.cc +++ b/net/http/http_auth_handler_digest_unittest.cc @@ -90,17 +90,17 @@ TEST(HttpAuthHandlerDigestTest, ParseChallenge) { for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { std::string challenge(tests[i].challenge); - HttpAuthHandlerDigest auth; - bool ok = auth.ParseChallenge(challenge.begin(), challenge.end()); + scoped_refptr<HttpAuthHandlerDigest> digest = new HttpAuthHandlerDigest; + bool ok = digest->ParseChallenge(challenge.begin(), challenge.end()); EXPECT_EQ(tests[i].parsed_success, ok); - EXPECT_STREQ(tests[i].parsed_realm, auth.realm_.c_str()); - EXPECT_STREQ(tests[i].parsed_nonce, auth.nonce_.c_str()); - EXPECT_STREQ(tests[i].parsed_domain, auth.domain_.c_str()); - EXPECT_STREQ(tests[i].parsed_opaque, auth.opaque_.c_str()); - EXPECT_EQ(tests[i].parsed_stale, auth.stale_); - EXPECT_EQ(tests[i].parsed_algorithm, auth.algorithm_); - EXPECT_EQ(tests[i].parsed_qop, auth.qop_); + EXPECT_STREQ(tests[i].parsed_realm, digest->realm_.c_str()); + EXPECT_STREQ(tests[i].parsed_nonce, digest->nonce_.c_str()); + EXPECT_STREQ(tests[i].parsed_domain, digest->domain_.c_str()); + EXPECT_STREQ(tests[i].parsed_opaque, digest->opaque_.c_str()); + EXPECT_EQ(tests[i].parsed_stale, digest->stale_); + EXPECT_EQ(tests[i].parsed_algorithm, digest->algorithm_); + EXPECT_EQ(tests[i].parsed_qop, digest->qop_); } } @@ -236,12 +236,12 @@ TEST(HttpAuthHandlerDigestTest, AssembleCredentials) { } }; for (size_t i = 0; i < ARRAYSIZE_UNSAFE(tests); ++i) { - HttpAuthHandlerDigest digest; + scoped_refptr<HttpAuthHandlerDigest> digest = new HttpAuthHandlerDigest; std::string challenge = tests[i].challenge; - EXPECT_TRUE(digest.InitFromChallenge( + EXPECT_TRUE(digest->InitFromChallenge( challenge.begin(), challenge.end(), HttpAuth::AUTH_SERVER)); - std::string creds = digest.AssembleCredentials(tests[i].req_method, + std::string creds = digest->AssembleCredentials(tests[i].req_method, tests[i].req_path, tests[i].username, tests[i].password, tests[i].cnonce, tests[i].nonce_count); |