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

Unified Diff: net/ntlm/ntlm_unittest.cc

Issue 2904633002: Replace NTLMv1 implementation with a functionally equivalent one.
Patch Set: Merge build config back to net Created 3 years, 5 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
« net/ntlm/ntlm_client_unittest.cc ('K') | « net/ntlm/ntlm_test_data.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/ntlm/ntlm_unittest.cc
diff --git a/net/ntlm/ntlm_unittest.cc b/net/ntlm/ntlm_unittest.cc
index cf237fa3715d4dcdde5d355b32bc01dd6053bef3..af2abb27f6bb6e502e82c723e94811a148638f54 100644
--- a/net/ntlm/ntlm_unittest.cc
+++ b/net/ntlm/ntlm_unittest.cc
@@ -13,20 +13,27 @@
#include "net/ntlm/ntlm.h"
+#include <string>
+
+#include "base/strings/string_util.h"
#include "base/strings/utf_string_conversions.h"
+#include "build/build_config.h"
+#include "net/ntlm/ntlm.h"
+#include "net/ntlm/ntlm_buffer_reader.h"
+#include "net/ntlm/ntlm_buffer_writer.h"
#include "net/ntlm/ntlm_test_data.h"
-#include "testing/gtest/include/gtest/gtest.h"
+#include "testing/platform_test.h"
namespace net {
namespace ntlm {
-TEST(NtlmClientTest, GenerateNtlmHashV1PasswordSpecTests) {
+TEST(NtlmTest, GenerateNtlmHashV1PasswordSpecTests) {
uint8_t hash[NTLM_HASH_LEN];
GenerateNtlmHashV1(NTLM_PASSWORD, hash);
ASSERT_EQ(0, memcmp(hash, EXPECTED_V1_HASH, NTLM_HASH_LEN));
}
-TEST(NtlmClientTest, GenerateNtlmHashV1PasswordChangesHash) {
+TEST(NtlmTest, GenerateNtlmHashV1PasswordChangesHash) {
base::string16 password1 = base::UTF8ToUTF16("pwd01");
base::string16 password2 = base::UTF8ToUTF16("pwd02");
uint8_t hash1[NTLM_HASH_LEN];
@@ -39,7 +46,7 @@ TEST(NtlmClientTest, GenerateNtlmHashV1PasswordChangesHash) {
ASSERT_NE(0, memcmp(hash1, hash2, NTLM_HASH_LEN));
}
-TEST(NtlmClientTest, GenerateResponsesV1SpecTests) {
+TEST(NtlmTest, GenerateResponsesV1SpecTests) {
uint8_t lm_response[RESPONSE_V1_LEN];
uint8_t ntlm_response[RESPONSE_V1_LEN];
GenerateResponsesV1(NTLM_PASSWORD, SERVER_CHALLENGE, lm_response,
@@ -56,7 +63,7 @@ TEST(NtlmClientTest, GenerateResponsesV1SpecTests) {
ASSERT_EQ(0, memcmp(EXPECTED_V1_NTLM_RESPONSE, lm_response, RESPONSE_V1_LEN));
}
-TEST(NtlmClientTest, GenerateResponsesV1WithSSSpecTests) {
+TEST(NtlmTest, GenerateResponsesV1WithSSSpecTests) {
uint8_t lm_response[RESPONSE_V1_LEN];
uint8_t ntlm_response[RESPONSE_V1_LEN];
GenerateResponsesV1WithSS(NTLM_PASSWORD, SERVER_CHALLENGE, CLIENT_CHALLENGE,
@@ -68,7 +75,7 @@ TEST(NtlmClientTest, GenerateResponsesV1WithSSSpecTests) {
RESPONSE_V1_LEN));
}
-TEST(NtlmClientTest, GenerateResponsesV1WithSSClientChallengeUsed) {
+TEST(NtlmTest, GenerateResponsesV1WithSSClientChallengeUsed) {
uint8_t lm_response1[RESPONSE_V1_LEN];
uint8_t lm_response2[RESPONSE_V1_LEN];
uint8_t ntlm_response1[RESPONSE_V1_LEN];
@@ -94,7 +101,7 @@ TEST(NtlmClientTest, GenerateResponsesV1WithSSClientChallengeUsed) {
ASSERT_NE(0, memcmp(lm_response2, ntlm_response2, RESPONSE_V1_LEN));
}
-TEST(NtlmClientTest, GenerateResponsesV1WithSSVerifySSUsed) {
+TEST(NtlmTest, GenerateResponsesV1WithSSVerifySSUsed) {
uint8_t lm_response1[RESPONSE_V1_LEN];
uint8_t lm_response2[RESPONSE_V1_LEN];
uint8_t ntlm_response1[RESPONSE_V1_LEN];
@@ -112,4 +119,4 @@ TEST(NtlmClientTest, GenerateResponsesV1WithSSVerifySSUsed) {
}
} // namespace ntlm
-} // namespace net
+} // namespace net
« net/ntlm/ntlm_client_unittest.cc ('K') | « net/ntlm/ntlm_test_data.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698