Chromium Code Reviews| Index: net/base/net_util_icu_unittest.cc |
| diff --git a/net/base/net_util_icu_unittest.cc b/net/base/net_util_icu_unittest.cc |
| index 1b315c297c45edcb773d884c058208d3c9991aed..51690f6ffdf32179fe1cb6569b4a726203716319 100644 |
| --- a/net/base/net_util_icu_unittest.cc |
| +++ b/net/base/net_util_icu_unittest.cc |
| @@ -331,6 +331,21 @@ const IDNTestCase idn_cases[] = { |
| false, false, false, false, false, |
| false, false, false, false, false, |
| }}, |
| + // Padlock icon spoof. |
| + {"xn--google-hj64e", L"\U0001f512google.com", |
| + {false, false, false, false, false, |
| + false, false, false, false, false, |
| + false, false, false, false, false, |
| + false, false, false, false, false, |
| + }}, |
| + // Ensure that by blacklisting "\xd83d\xdd12", we have not inadvertently |
| + // blacklisted all strings with the surrogate '\xdd12'. |
|
mmenke
2015/06/05 15:08:06
nit: Don't use "we" in comments
Matt Giuca
2015/06/09 04:10:35
Hmm, not a fan of this rule (it means rewriting ac
|
| + {"xn--fk9c.com", L"\U00010912.com", |
| + {true, false, false, false, false, |
| + false, false, false, false, false, |
| + false, false, false, false, false, |
| + false, false, false, false, false, |
| + }}, |
| #if 0 |
| // These two cases are special. We need a separate test. |
| // U+3000 and U+3002 are normalized to ASCII space and dot. |
| @@ -422,7 +437,9 @@ TEST(NetUtilTest, IDNToUnicodeFast) { |
| WideToUTF16(idn_cases[i].unicode_output) : |
| ASCIIToUTF16(idn_cases[i].input)); |
| AppendLanguagesToOutputs(kLanguages[j], &expected, &output); |
| - EXPECT_EQ(expected, output); |
| + EXPECT_EQ(expected, output) << "input: \"" << idn_cases[i].input |
| + << "\", languages: \"" << kLanguages[j] |
| + << "\""; |
| } |
| } |
| } |
| @@ -438,7 +455,9 @@ TEST(NetUtilTest, IDNToUnicodeSlow) { |
| WideToUTF16(idn_cases[i].unicode_output) : |
| ASCIIToUTF16(idn_cases[i].input)); |
| AppendLanguagesToOutputs(kLanguages[j], &expected, &output); |
| - EXPECT_EQ(expected, output); |
| + EXPECT_EQ(expected, output) << "input: \"" << idn_cases[i].input |
| + << "\", languages: \"" << kLanguages[j] |
| + << "\""; |
| } |
| } |
| } |