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

Unified Diff: chrome/browser/autofill/form_field_unittest.cc

Issue 6633001: Convert autofill messages to use the new IPC macros (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 9 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/autofill/form_field.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/autofill/form_field_unittest.cc
===================================================================
--- chrome/browser/autofill/form_field_unittest.cc (revision 77285)
+++ chrome/browser/autofill/form_field_unittest.cc (working copy)
@@ -15,68 +15,68 @@
EXPECT_TRUE(FormField::Match(&field, string16(), true));
// Empty pattern matches non-empty string.
- field.set_label(ASCIIToUTF16("a"));
+ field.label = ASCIIToUTF16("a");
EXPECT_TRUE(FormField::Match(&field, string16(), true));
// Strictly empty pattern matches empty string.
- field.set_label(ASCIIToUTF16(""));
+ field.label = ASCIIToUTF16("");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^$"), true));
// Strictly empty pattern does not match non-empty string.
- field.set_label(ASCIIToUTF16("a"));
+ field.label = ASCIIToUTF16("a");
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^$"), true));
// Non-empty pattern doesn't match empty string.
- field.set_label(string16());
+ field.label = string16();
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("a"), true));
// Beginning of line.
- field.set_label(ASCIIToUTF16("head_tail"));
+ field.label = ASCIIToUTF16("head_tail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^head"), true));
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^tail"), true));
// End of line.
- field.set_label(ASCIIToUTF16("head_tail"));
+ field.label = ASCIIToUTF16("head_tail");
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("head$"), true));
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("tail$"), true));
// Exact.
- field.set_label(ASCIIToUTF16("head_tail"));
+ field.label = ASCIIToUTF16("head_tail");
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^head$"), true));
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^tail$"), true));
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^head_tail$"), true));
// Escaped dots.
- field.set_label(ASCIIToUTF16("m.i."));
+ field.label = ASCIIToUTF16("m.i.");
// Note: This pattern is misleading as the "." characters are wild cards.
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m.i."), true));
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m\\.i\\."), true));
- field.set_label(ASCIIToUTF16("mXiX"));
+ field.label = ASCIIToUTF16("mXiX");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m.i."), true));
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("m\\.i\\."), true));
// Repetition.
- field.set_label(ASCIIToUTF16("headtail"));
+ field.label = ASCIIToUTF16("headtail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"), true));
- field.set_label(ASCIIToUTF16("headXtail"));
+ field.label = ASCIIToUTF16("headXtail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"), true));
- field.set_label(ASCIIToUTF16("headXXXtail"));
+ field.label = ASCIIToUTF16("headXXXtail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"), true));
- field.set_label(ASCIIToUTF16("headtail"));
+ field.label = ASCIIToUTF16("headtail");
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("head.+tail"), true));
- field.set_label(ASCIIToUTF16("headXtail"));
+ field.label = ASCIIToUTF16("headXtail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.+tail"), true));
- field.set_label(ASCIIToUTF16("headXXXtail"));
+ field.label = ASCIIToUTF16("headXXXtail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.+tail"), true));
// Alternation.
- field.set_label(ASCIIToUTF16("head_tail"));
+ field.label = ASCIIToUTF16("head_tail");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head|other"), true));
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("tail|other"), true));
EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("bad|good"), true));
// Case sensitivity.
- field.set_label(ASCIIToUTF16("xxxHeAd_tAiLxxx"));
+ field.label = ASCIIToUTF16("xxxHeAd_tAiLxxx");
EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head_tail"), true));
}
« no previous file with comments | « chrome/browser/autofill/form_field.cc ('k') | chrome/browser/autofill/form_structure.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698