| Index: net/base/escape_unittest.cc
|
| diff --git a/net/base/escape_unittest.cc b/net/base/escape_unittest.cc
|
| index 74ae29336d82c2f1ea1379edb196a9b8392b0a1b..1e82239b8959430bb66713b9e532d2c1d560c508 100644
|
| --- a/net/base/escape_unittest.cc
|
| +++ b/net/base/escape_unittest.cc
|
| @@ -232,7 +232,8 @@ TEST(EscapeTest, UnescapeURLComponent) {
|
| {L"Some%20random text %25%E2%80%84OK", UnescapeRule::NORMAL,
|
| L"Some%20random text %25\xE2\x80\x84OK"},
|
|
|
| - // BiDi Control characters should not be unescaped.
|
| + // BiDi Control characters should not be unescaped unless explicity told to
|
| + // do so with UnescapeRule::CONTROL_CHARS
|
| {L"Some%20random text %25%D8%9COK", UnescapeRule::NORMAL,
|
| L"Some%20random text %25%D8%9COK"},
|
| {L"Some%20random text %25%E2%80%8EOK", UnescapeRule::NORMAL,
|
| @@ -249,6 +250,31 @@ TEST(EscapeTest, UnescapeURLComponent) {
|
| L"Some%20random text %25%E2%81%A6OK"},
|
| {L"Some%20random text %25%E2%81%A9OK", UnescapeRule::NORMAL,
|
| L"Some%20random text %25%E2%81%A9OK"},
|
| + // UnescapeRule::CONTROL_CHARS should unescape BiDi Control characters.
|
| + {L"Some%20random text %25%D8%9COK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xD8\x9COK"},
|
| + {L"Some%20random text %25%E2%80%8EOK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x80\x8EOK"},
|
| + {L"Some%20random text %25%E2%80%8FOK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x80\x8FOK"},
|
| + {L"Some%20random text %25%E2%80%AAOK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x80\xAAOK"},
|
| + {L"Some%20random text %25%E2%80%ABOK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x80\xABOK"},
|
| + {L"Some%20random text %25%E2%80%AEOK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x80\xAEOK"},
|
| + {L"Some%20random text %25%E2%81%A6OK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x81\xA6OK"},
|
| + {L"Some%20random text %25%E2%81%A9OK",
|
| + UnescapeRule::NORMAL | UnescapeRule::CONTROL_CHARS,
|
| + L"Some%20random text %25\xE2\x81\xA9OK"},
|
|
|
| {L"Some%20random text %25%2dOK", UnescapeRule::SPACES,
|
| L"Some random text %25-OK"},
|
|
|