Lines Matching refs:Match
14 TEST(FormFieldTest, Match) {
17 // Empty strings match.
18 EXPECT_TRUE(FormField::Match(&field, base::string16(),
23 EXPECT_TRUE(FormField::Match(&field, base::string16(),
28 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^$"),
31 // Strictly empty pattern does not match non-empty string.
33 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^$"),
36 // Non-empty pattern doesn't match empty string.
38 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("a"),
43 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^head"),
45 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^tail"),
50 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("head$"),
52 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("tail$"),
57 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^head$"),
59 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("^tail$"),
61 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("^head_tail$"),
67 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m.i."),
69 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m\\.i\\."),
72 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("m.i."),
74 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("m\\.i\\."),
79 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"),
82 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"),
85 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.*tail"),
88 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("head.+tail"),
91 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.+tail"),
94 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head.+tail"),
99 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head|other"),
101 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("tail|other"),
103 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("bad|good"),
108 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("head_tail"),
113 EXPECT_TRUE(FormField::Match(&field, ASCIIToUTF16("\\bword\\b"),
115 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("\\bcon\\b"),
119 EXPECT_FALSE(FormField::Match(&field, ASCIIToUTF16("\\bcr\\b"),