summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_negotiate_unittest.cc
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 14:17:14 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-06-07 14:17:14 +0000
commit36c8e5f7523eb31c11fce92246cdaca4e7af4f36 (patch)
tree117a4786075700fb0b86b843304964c694adf533 /net/http/http_auth_handler_negotiate_unittest.cc
parent7ec0cb21f022b28c20e6e44e5f38f9ed6bc13a16 (diff)
downloadchromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.zip
chromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.tar.gz
chromium_src-36c8e5f7523eb31c11fce92246cdaca4e7af4f36.tar.bz2
HttpAuthHandler's are no longer refcounted.
Since HttpAuthHandler objects are no longer contained inside of the HttpAuthCache, the lifetime of the handlers is more clearly defined. TEST=net_unittests (including some changes) BUG=42222 Review URL: http://codereview.chromium.org/2635004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49052 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_handler_negotiate_unittest.cc')
-rw-r--r--net/http/http_auth_handler_negotiate_unittest.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index ca54b47..910b5ef 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -22,10 +22,10 @@ namespace {
void CreateHandler(bool disable_cname_lookup, bool include_port,
const std::string& url_string,
SSPILibrary* sspi_library,
- scoped_refptr<HttpAuthHandlerNegotiate>* handler) {
- *handler = new HttpAuthHandlerNegotiate(sspi_library, 50, NULL,
- disable_cname_lookup,
- include_port);
+ scoped_ptr<HttpAuthHandlerNegotiate>* handler) {
+ handler->reset(new HttpAuthHandlerNegotiate(sspi_library, 50, NULL,
+ disable_cname_lookup,
+ include_port));
std::string challenge = "Negotiate";
HttpAuth::ChallengeTokenizer props(challenge.begin(), challenge.end());
GURL gurl(url_string);
@@ -37,7 +37,7 @@ void CreateHandler(bool disable_cname_lookup, bool include_port,
TEST(HttpAuthHandlerNegotiateTest, DisableCname) {
MockSSPILibrary mock_library;
- scoped_refptr<HttpAuthHandlerNegotiate> auth_handler;
+ scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
CreateHandler(true, false, "http://alias:500", &mock_library, &auth_handler);
EXPECT_FALSE(auth_handler->NeedsCanonicalName());
EXPECT_EQ(L"HTTP/alias", auth_handler->spn());
@@ -45,7 +45,7 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCname) {
TEST(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
MockSSPILibrary mock_library;
- scoped_refptr<HttpAuthHandlerNegotiate> auth_handler;
+ scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
CreateHandler(true, true, "http://alias:80", &mock_library, &auth_handler);
EXPECT_FALSE(auth_handler->NeedsCanonicalName());
EXPECT_EQ(L"HTTP/alias", auth_handler->spn());
@@ -53,7 +53,7 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCnameStandardPort) {
TEST(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
MockSSPILibrary mock_library;
- scoped_refptr<HttpAuthHandlerNegotiate> auth_handler;
+ scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
CreateHandler(true, true, "http://alias:500", &mock_library, &auth_handler);
EXPECT_FALSE(auth_handler->NeedsCanonicalName());
EXPECT_EQ(L"HTTP/alias:500", auth_handler->spn());
@@ -61,7 +61,7 @@ TEST(HttpAuthHandlerNegotiateTest, DisableCnameNonstandardPort) {
TEST(HttpAuthHandlerNegotiateTest, CnameSync) {
MockSSPILibrary mock_library;
- scoped_refptr<HttpAuthHandlerNegotiate> auth_handler;
+ scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
CreateHandler(false, false, "http://alias:500", &mock_library, &auth_handler);
EXPECT_TRUE(auth_handler->NeedsCanonicalName());
MockHostResolver* mock_resolver = new MockHostResolver();
@@ -76,7 +76,7 @@ TEST(HttpAuthHandlerNegotiateTest, CnameSync) {
TEST(HttpAuthHandlerNegotiateTest, CnameAsync) {
MockSSPILibrary mock_library;
- scoped_refptr<HttpAuthHandlerNegotiate> auth_handler;
+ scoped_ptr<HttpAuthHandlerNegotiate> auth_handler;
CreateHandler(false, false, "http://alias:500", &mock_library, &auth_handler);
EXPECT_TRUE(auth_handler->NeedsCanonicalName());
MockHostResolver* mock_resolver = new MockHostResolver();