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

Unified Diff: components/autofill/core/browser/password_generator_unittest.cc

Issue 308503002: [Password Generation] Start using pronouncable passwords (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unnecessary includes Created 6 years, 6 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
« no previous file with comments | « components/autofill/core/browser/password_generator.cc ('k') | third_party/fips181/convert.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/autofill/core/browser/password_generator_unittest.cc
diff --git a/components/autofill/core/browser/password_generator_unittest.cc b/components/autofill/core/browser/password_generator_unittest.cc
index 57aa60852d954a59646f9d5fc6e17e89424afcda..c93ee5803daba90f237b50f921fef804c1de1c74 100644
--- a/components/autofill/core/browser/password_generator_unittest.cc
+++ b/components/autofill/core/browser/password_generator_unittest.cc
@@ -4,6 +4,7 @@
#include <locale>
+#include "base/logging.h"
#include "components/autofill/core/browser/password_generator.h"
#include "testing/gtest/include/gtest/gtest.h"
@@ -31,7 +32,6 @@ TEST(PasswordGeneratorTest, PasswordPattern) {
int num_upper_case_letters = 0;
int num_lower_case_letters = 0;
int num_digits = 0;
- int num_other_symbols = 0;
for (size_t i = 0; i < password.size(); i++) {
if (isupper(password[i]))
++num_upper_case_letters;
@@ -39,13 +39,10 @@ TEST(PasswordGeneratorTest, PasswordPattern) {
++num_lower_case_letters;
else if (isdigit(password[i]))
++num_digits;
- else
- ++num_other_symbols;
}
- EXPECT_GT(num_upper_case_letters, 0);
- EXPECT_GT(num_lower_case_letters, 0);
- EXPECT_GT(num_digits, 0);
- EXPECT_EQ(num_other_symbols, 1);
+ EXPECT_GT(num_upper_case_letters, 0) << password;
+ EXPECT_GT(num_lower_case_letters, 0) << password;
+ EXPECT_GT(num_digits, 0) << password;
}
TEST(PasswordGeneratorTest, Printable) {
« no previous file with comments | « components/autofill/core/browser/password_generator.cc ('k') | third_party/fips181/convert.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698