| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include <string> | 5 #include <string> |
| 6 | 6 |
| 7 #include "base/basictypes.h" | 7 #include "base/basictypes.h" |
| 8 #include "base/string_util.h" | 8 #include "base/string_util.h" |
| 9 #include "base/utf_string_conversions.h" |
| 9 #include "net/base/net_errors.h" | 10 #include "net/base/net_errors.h" |
| 10 #include "net/http/http_auth_handler_digest.h" | 11 #include "net/http/http_auth_handler_digest.h" |
| 11 #include "testing/gtest/include/gtest/gtest.h" | 12 #include "testing/gtest/include/gtest/gtest.h" |
| 12 | 13 |
| 13 namespace net { | 14 namespace net { |
| 14 | 15 |
| 15 TEST(HttpAuthHandlerDigestTest, ParseChallenge) { | 16 TEST(HttpAuthHandlerDigestTest, ParseChallenge) { |
| 16 static const struct { | 17 static const struct { |
| 17 // The challenge string. | 18 // The challenge string. |
| 18 const char* challenge; | 19 const char* challenge; |
| (...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 ASCIIToUTF16(tests[i].username), | 285 ASCIIToUTF16(tests[i].username), |
| 285 ASCIIToUTF16(tests[i].password), | 286 ASCIIToUTF16(tests[i].password), |
| 286 tests[i].cnonce, | 287 tests[i].cnonce, |
| 287 tests[i].nonce_count); | 288 tests[i].nonce_count); |
| 288 | 289 |
| 289 EXPECT_STREQ(tests[i].expected_creds, creds.c_str()); | 290 EXPECT_STREQ(tests[i].expected_creds, creds.c_str()); |
| 290 } | 291 } |
| 291 } | 292 } |
| 292 | 293 |
| 293 } // namespace net | 294 } // namespace net |
| OLD | NEW |