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

Unified Diff: chrome/browser/chromeos/login/authenticator_unittest.cc

Issue 6089004: [Chrome OS] Respect periods in google apps account names (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address avayvod comments Created 10 years 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 | « chrome/browser/chromeos/login/authenticator.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/login/authenticator_unittest.cc
diff --git a/chrome/browser/chromeos/login/authenticator_unittest.cc b/chrome/browser/chromeos/login/authenticator_unittest.cc
index 48ab3785ccc87b123e0642fe8cd08e9a8c5d4327..d6bd14977709b63d7543e6af711e4a9767d31f0a 100644
--- a/chrome/browser/chromeos/login/authenticator_unittest.cc
+++ b/chrome/browser/chromeos/login/authenticator_unittest.cc
@@ -23,19 +23,29 @@ TEST(AuthenticatorTest, EmailAddressIgnoreDomainCaps) {
Authenticator::Canonicalize("UsEr@what.COM"));
}
-TEST(AuthenticatorTest, EmailAddressIgnoreOneUsernameDot) {
- EXPECT_EQ(Authenticator::Canonicalize("us.er@what.com"),
+TEST(AuthenticatorTest, EmailAddressRejectOneUsernameDot) {
+ EXPECT_NE(Authenticator::Canonicalize("u.ser@what.com"),
Authenticator::Canonicalize("UsEr@what.com"));
}
-TEST(AuthenticatorTest, EmailAddressIgnoreManyUsernameDots) {
+TEST(AuthenticatorTest, EmailAddressMatchWithOneUsernameDot) {
EXPECT_EQ(Authenticator::Canonicalize("u.ser@what.com"),
- Authenticator::Canonicalize("Us.E.r@what.com"));
+ Authenticator::Canonicalize("U.sEr@what.com"));
+}
+
+TEST(AuthenticatorTest, EmailAddressIgnoreOneUsernameDot) {
+ EXPECT_EQ(Authenticator::Canonicalize("us.er@gmail.com"),
+ Authenticator::Canonicalize("UsEr@gmail.com"));
+}
+
+TEST(AuthenticatorTest, EmailAddressIgnoreManyUsernameDots) {
+ EXPECT_EQ(Authenticator::Canonicalize("u.ser@gmail.com"),
+ Authenticator::Canonicalize("Us.E.r@gmail.com"));
}
TEST(AuthenticatorTest, EmailAddressIgnoreConsecutiveUsernameDots) {
- EXPECT_EQ(Authenticator::Canonicalize("use.r@what.com"),
- Authenticator::Canonicalize("Us....E.r@what.com"));
+ EXPECT_EQ(Authenticator::Canonicalize("use.r@gmail.com"),
+ Authenticator::Canonicalize("Us....E.r@gmail.com"));
}
TEST(AuthenticatorTest, EmailAddressDifferentOnesRejected) {
« no previous file with comments | « chrome/browser/chromeos/login/authenticator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698