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

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

Issue 6091010: Merge 70318 - [Chrome OS] Respect periods in google apps account names... (Closed) Base URL: svn://svn.chromium.org/chrome/branches/597/src/
Patch Set: Created 9 years, 12 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 | « 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
===================================================================
--- chrome/browser/chromeos/login/authenticator_unittest.cc (revision 70397)
+++ chrome/browser/chromeos/login/authenticator_unittest.cc (working copy)
@@ -23,19 +23,29 @@
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