summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_negotiate_unittest.cc
diff options
context:
space:
mode:
authorerg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-11 20:44:42 +0000
committererg@google.com <erg@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-02-11 20:44:42 +0000
commit5322a7f16a374a15fe69b3bb2621678aede48bca (patch)
tree56c8ee955ed32cd69f8b3395cb609dcdd504e58c /net/http/http_auth_handler_negotiate_unittest.cc
parent192a05f2e4d8f66d095227439d4dce7bb14b16b5 (diff)
downloadchromium_src-5322a7f16a374a15fe69b3bb2621678aede48bca.zip
chromium_src-5322a7f16a374a15fe69b3bb2621678aede48bca.tar.gz
chromium_src-5322a7f16a374a15fe69b3bb2621678aede48bca.tar.bz2
Continuing with the out-of-lining of test code.
BUG=none TEST=compiles Review URL: http://codereview.chromium.org/6485015 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@74660 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.cc34
1 files changed, 15 insertions, 19 deletions
diff --git a/net/http/http_auth_handler_negotiate_unittest.cc b/net/http/http_auth_handler_negotiate_unittest.cc
index bb57151..cdaa5f3 100644
--- a/net/http/http_auth_handler_negotiate_unittest.cc
+++ b/net/http/http_auth_handler_negotiate_unittest.cc
@@ -116,23 +116,20 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest {
1, // Locally initiated
1); // Open
test::MockGSSAPILibrary::SecurityContextQuery queries[] = {
- { "Negotiate", // Package name
+ test::MockGSSAPILibrary::SecurityContextQuery(
+ "Negotiate", // Package name
GSS_S_CONTINUE_NEEDED, // Major response code
0, // Minor response code
context1, // Context
- { 0, NULL }, // Expected input token
- { arraysize(kAuthResponse),
- const_cast<char*>(kAuthResponse) } // Output token
- },
- { "Negotiate", // Package name
+ NULL, // Expected input token
+ kAuthResponse), // Output token
+ test::MockGSSAPILibrary::SecurityContextQuery(
+ "Negotiate", // Package name
GSS_S_COMPLETE, // Major response code
0, // Minor response code
context2, // Context
- { arraysize(kAuthResponse),
- const_cast<char*>(kAuthResponse) }, // Expected input token
- { arraysize(kAuthResponse),
- const_cast<char*>(kAuthResponse) } // Output token
- },
+ kAuthResponse, // Expected input token
+ kAuthResponse) // Output token
};
for (size_t i = 0; i < arraysize(queries); ++i) {
@@ -159,14 +156,13 @@ class HttpAuthHandlerNegotiateTest : public PlatformTest {
0, // Context flags
1, // Locally initiated
0); // Open
- test::MockGSSAPILibrary::SecurityContextQuery query = {
- "Negotiate", // Package name
- major_status, // Major response code
- minor_status, // Minor response code
- context, // Context
- { 0, NULL }, // Expected input token
- { 0, NULL } // Output token
- };
+ test::MockGSSAPILibrary::SecurityContextQuery query(
+ "Negotiate", // Package name
+ major_status, // Major response code
+ minor_status, // Minor response code
+ context, // Context
+ NULL, // Expected input token
+ NULL); // Output token
mock_library->ExpectSecurityContext(query.expected_package,
query.response_code,