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

Unified Diff: third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp

Issue 1408833006: EmailInputType::convertEmailAddressToASCII() should not try to convert non-email addresses. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use isValidEmailAddress() instead of ad-hoc check Created 5 years, 1 month 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 | « third_party/WebKit/Source/core/html/forms/EmailInputType.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
diff --git a/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp b/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
index 2e1740a09d9c99a2cb2c45c19ae346847ef79334..5c1a6569f6d8995f624f49802c3ad1558ed96479 100644
--- a/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
+++ b/third_party/WebKit/Source/core/html/forms/EmailInputTypeTest.cpp
@@ -29,6 +29,14 @@ void expectToFail(const String& source)
TEST(EmailInputTypeTest, ConvertEmailAddressToASCII)
{
+ // U+043C U+043E U+0439 . U+0434 U+043E U+043C U+0435 U+043D
+ expectToFail(String::fromUTF8("user@\xD0\xBC\xD0\xBE\xD0\xB9.\xD0\xB4\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD@"));
+ expectToFail(String::fromUTF8("user@\xD0\xBC\xD0\xBE\xD0\xB9. \xD0\xB4\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD"));
+ expectToFail(String::fromUTF8("user@\xD0\xBC\xD0\xBE\xD0\xB9.\t\xD0\xB4\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD"));
+}
+
+TEST(EmailInputTypeTest, ConvertEmailAddressToASCIIUTS46)
+{
// http://unicode.org/reports/tr46/#Table_IDNA_Comparisons
// U+00E0
« no previous file with comments | « third_party/WebKit/Source/core/html/forms/EmailInputType.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698