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

Unified Diff: net/http/http_auth_sspi_win_unittest.cc

Issue 266243004: Clang format slam. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
Index: net/http/http_auth_sspi_win_unittest.cc
diff --git a/net/http/http_auth_sspi_win_unittest.cc b/net/http/http_auth_sspi_win_unittest.cc
index 586822d2ef774862c5317300a433813a90252e12..b3bd313d20ecb04c5cd6161c71dd3f1b036c71a3 100644
--- a/net/http/http_auth_sspi_win_unittest.cc
+++ b/net/http/http_auth_sspi_win_unittest.cc
@@ -47,8 +47,8 @@ TEST(HttpAuthSSPITest, DetermineMaxTokenLength_Normal) {
TEST(HttpAuthSSPITest, DetermineMaxTokenLength_InvalidPackage) {
MockSSPILibrary mock_library;
- mock_library.ExpectQuerySecurityPackageInfo(L"Foo", SEC_E_SECPKG_NOT_FOUND,
- NULL);
+ mock_library.ExpectQuerySecurityPackageInfo(
+ L"Foo", SEC_E_SECPKG_NOT_FOUND, NULL);
ULONG max_token_length = kMaxTokenLength;
int rv = DetermineMaxTokenLength(&mock_library, L"Foo", &max_token_length);
EXPECT_EQ(ERR_UNSUPPORTED_AUTH_SCHEME, rv);
@@ -60,8 +60,8 @@ TEST(HttpAuthSSPITest, DetermineMaxTokenLength_InvalidPackage) {
TEST(HttpAuthSSPITest, ParseChallenge_FirstRound) {
// The first round should just consist of an unadorned "Negotiate" header.
MockSSPILibrary mock_library;
- HttpAuthSSPI auth_sspi(&mock_library, "Negotiate",
- NEGOSSP_NAME, kMaxTokenLength);
+ HttpAuthSSPI auth_sspi(
+ &mock_library, "Negotiate", NEGOSSP_NAME, kMaxTokenLength);
std::string challenge_text = "Negotiate";
HttpAuthChallengeTokenizer challenge(challenge_text.begin(),
challenge_text.end());
@@ -73,8 +73,8 @@ TEST(HttpAuthSSPITest, ParseChallenge_TwoRounds) {
// The first round should just have "Negotiate", and the second round should
// have a valid base64 token associated with it.
MockSSPILibrary mock_library;
- HttpAuthSSPI auth_sspi(&mock_library, "Negotiate",
- NEGOSSP_NAME, kMaxTokenLength);
+ HttpAuthSSPI auth_sspi(
+ &mock_library, "Negotiate", NEGOSSP_NAME, kMaxTokenLength);
std::string first_challenge_text = "Negotiate";
HttpAuthChallengeTokenizer first_challenge(first_challenge_text.begin(),
first_challenge_text.end());
@@ -83,8 +83,9 @@ TEST(HttpAuthSSPITest, ParseChallenge_TwoRounds) {
// Generate an auth token and create another thing.
std::string auth_token;
- EXPECT_EQ(OK, auth_sspi.GenerateAuthToken(NULL, "HTTP/intranet.google.com",
- &auth_token));
+ EXPECT_EQ(OK,
+ auth_sspi.GenerateAuthToken(
+ NULL, "HTTP/intranet.google.com", &auth_token));
std::string second_challenge_text = "Negotiate Zm9vYmFy";
HttpAuthChallengeTokenizer second_challenge(second_challenge_text.begin(),
@@ -97,8 +98,8 @@ TEST(HttpAuthSSPITest, ParseChallenge_UnexpectedTokenFirstRound) {
// If the first round challenge has an additional authentication token, it
// should be treated as an invalid challenge from the server.
MockSSPILibrary mock_library;
- HttpAuthSSPI auth_sspi(&mock_library, "Negotiate",
- NEGOSSP_NAME, kMaxTokenLength);
+ HttpAuthSSPI auth_sspi(
+ &mock_library, "Negotiate", NEGOSSP_NAME, kMaxTokenLength);
std::string challenge_text = "Negotiate Zm9vYmFy";
HttpAuthChallengeTokenizer challenge(challenge_text.begin(),
challenge_text.end());
@@ -110,8 +111,8 @@ TEST(HttpAuthSSPITest, ParseChallenge_MissingTokenSecondRound) {
// If a later-round challenge is simply "Negotiate", it should be treated as
// an authentication challenge rejection from the server or proxy.
MockSSPILibrary mock_library;
- HttpAuthSSPI auth_sspi(&mock_library, "Negotiate",
- NEGOSSP_NAME, kMaxTokenLength);
+ HttpAuthSSPI auth_sspi(
+ &mock_library, "Negotiate", NEGOSSP_NAME, kMaxTokenLength);
std::string first_challenge_text = "Negotiate";
HttpAuthChallengeTokenizer first_challenge(first_challenge_text.begin(),
first_challenge_text.end());
@@ -119,8 +120,9 @@ TEST(HttpAuthSSPITest, ParseChallenge_MissingTokenSecondRound) {
auth_sspi.ParseChallenge(&first_challenge));
std::string auth_token;
- EXPECT_EQ(OK, auth_sspi.GenerateAuthToken(NULL, "HTTP/intranet.google.com",
- &auth_token));
+ EXPECT_EQ(OK,
+ auth_sspi.GenerateAuthToken(
+ NULL, "HTTP/intranet.google.com", &auth_token));
std::string second_challenge_text = "Negotiate";
HttpAuthChallengeTokenizer second_challenge(second_challenge_text.begin(),
second_challenge_text.end());
@@ -132,8 +134,8 @@ TEST(HttpAuthSSPITest, ParseChallenge_NonBase64EncodedToken) {
// If a later-round challenge has an invalid base64 encoded token, it should
// be treated as an invalid challenge.
MockSSPILibrary mock_library;
- HttpAuthSSPI auth_sspi(&mock_library, "Negotiate",
- NEGOSSP_NAME, kMaxTokenLength);
+ HttpAuthSSPI auth_sspi(
+ &mock_library, "Negotiate", NEGOSSP_NAME, kMaxTokenLength);
std::string first_challenge_text = "Negotiate";
HttpAuthChallengeTokenizer first_challenge(first_challenge_text.begin(),
first_challenge_text.end());
@@ -141,8 +143,9 @@ TEST(HttpAuthSSPITest, ParseChallenge_NonBase64EncodedToken) {
auth_sspi.ParseChallenge(&first_challenge));
std::string auth_token;
- EXPECT_EQ(OK, auth_sspi.GenerateAuthToken(NULL, "HTTP/intranet.google.com",
- &auth_token));
+ EXPECT_EQ(OK,
+ auth_sspi.GenerateAuthToken(
+ NULL, "HTTP/intranet.google.com", &auth_token));
std::string second_challenge_text = "Negotiate =happyjoy=";
HttpAuthChallengeTokenizer second_challenge(second_challenge_text.begin(),
second_challenge_text.end());

Powered by Google App Engine
This is Rietveld 408576698