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

Side by Side Diff: content/renderer/android/email_detector_unittest.cc

Issue 1541093002: Email Regular Expression update for exclusion of invalid domain parts (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Patch Set 2 Created 4 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 unified diff | Download patch
« no previous file with comments | « content/renderer/android/email_detector.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/renderer/android/email_detector.h" 5 #include "content/renderer/android/email_detector.h"
6 6
7 #include "base/strings/utf_string_conversions.h" 7 #include "base/strings/utf_string_conversions.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace content { 10 namespace content {
(...skipping 30 matching lines...) Expand all
41 "SOMEONE@GOOGLE.COM"); 41 "SOMEONE@GOOGLE.COM");
42 FindAndCheckEmail("It's \"testadd@company.fr\"", "testadd@company.fr"); 42 FindAndCheckEmail("It's \"testadd@company.fr\"", "testadd@company.fr");
43 FindAndCheckEmail("This is not an @emailaddress.com", ""); 43 FindAndCheckEmail("This is not an @emailaddress.com", "");
44 FindAndCheckEmail("Apples @2.50 each", ""); 44 FindAndCheckEmail("Apples @2.50 each", "");
45 FindAndCheckEmail("Log on to google.com", ""); 45 FindAndCheckEmail("Log on to google.com", "");
46 FindAndCheckEmail("Try someone@, they might know.", ""); 46 FindAndCheckEmail("Try someone@, they might know.", "");
47 FindAndCheckEmail("No, bob@com is not an email address.", ""); 47 FindAndCheckEmail("No, bob@com is not an email address.", "");
48 FindAndCheckEmail("@", ""); 48 FindAndCheckEmail("@", "");
49 FindAndCheckEmail("Just bob @google.com", ""); 49 FindAndCheckEmail("Just bob @google.com", "");
50 FindAndCheckEmail("Why not call larry@google and ask him.", ""); 50 FindAndCheckEmail("Why not call larry@google and ask him.", "");
51 FindAndCheckEmail("Lets test invalid invalid@email..com address", "");
52 FindAndCheckEmail("Invalid dots are bad invalid@.email.com address", "");
51 } 53 }
52 54
53 } // namespace content 55 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/android/email_detector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698