| Index: base/strings/string_util_unittest.cc
|
| diff --git a/base/strings/string_util_unittest.cc b/base/strings/string_util_unittest.cc
|
| index fb0beada4b344b5223c3610e42a071ca63295bab..ad7ff247c993c968d12d291a2f94fc93d1d04283 100644
|
| --- a/base/strings/string_util_unittest.cc
|
| +++ b/base/strings/string_util_unittest.cc
|
| @@ -994,45 +994,6 @@ TEST(StringUtilTest, ReplaceStringPlaceholdersConsecutiveDollarSigns) {
|
| "$1 $$2 $$$3");
|
| }
|
|
|
| -TEST(StringUtilTest, MatchPatternTest) {
|
| - EXPECT_TRUE(MatchPattern("www.google.com", "*.com"));
|
| - EXPECT_TRUE(MatchPattern("www.google.com", "*"));
|
| - EXPECT_FALSE(MatchPattern("www.google.com", "www*.g*.org"));
|
| - EXPECT_TRUE(MatchPattern("Hello", "H?l?o"));
|
| - EXPECT_FALSE(MatchPattern("www.google.com", "http://*)"));
|
| - EXPECT_FALSE(MatchPattern("www.msn.com", "*.COM"));
|
| - EXPECT_TRUE(MatchPattern("Hello*1234", "He??o\\*1*"));
|
| - EXPECT_FALSE(MatchPattern("", "*.*"));
|
| - EXPECT_TRUE(MatchPattern("", "*"));
|
| - EXPECT_TRUE(MatchPattern("", "?"));
|
| - EXPECT_TRUE(MatchPattern("", ""));
|
| - EXPECT_FALSE(MatchPattern("Hello", ""));
|
| - EXPECT_TRUE(MatchPattern("Hello*", "Hello*"));
|
| - // Stop after a certain recursion depth.
|
| - EXPECT_FALSE(MatchPattern("123456789012345678", "?????????????????*"));
|
| -
|
| - // Test UTF8 matching.
|
| - EXPECT_TRUE(MatchPattern("heart: \xe2\x99\xa0", "*\xe2\x99\xa0"));
|
| - EXPECT_TRUE(MatchPattern("heart: \xe2\x99\xa0.", "heart: ?."));
|
| - EXPECT_TRUE(MatchPattern("hearts: \xe2\x99\xa0\xe2\x99\xa0", "*"));
|
| - // Invalid sequences should be handled as a single invalid character.
|
| - EXPECT_TRUE(MatchPattern("invalid: \xef\xbf\xbe", "invalid: ?"));
|
| - // If the pattern has invalid characters, it shouldn't match anything.
|
| - EXPECT_FALSE(MatchPattern("\xf4\x90\x80\x80", "\xf4\x90\x80\x80"));
|
| -
|
| - // Test UTF16 character matching.
|
| - EXPECT_TRUE(MatchPattern(UTF8ToUTF16("www.google.com"),
|
| - UTF8ToUTF16("*.com")));
|
| - EXPECT_TRUE(MatchPattern(UTF8ToUTF16("Hello*1234"),
|
| - UTF8ToUTF16("He??o\\*1*")));
|
| -
|
| - // This test verifies that consecutive wild cards are collapsed into 1
|
| - // wildcard (when this doesn't occur, MatchPattern reaches it's maximum
|
| - // recursion depth).
|
| - EXPECT_TRUE(MatchPattern(UTF8ToUTF16("Hello"),
|
| - UTF8ToUTF16("He********************************o")));
|
| -}
|
| -
|
| TEST(StringUtilTest, LcpyTest) {
|
| // Test the normal case where we fit in our buffer.
|
| {
|
|
|