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

Unified Diff: net/base/escape_unittest.cc

Issue 664803003: Update from chromium a8e7c94b1b79a0948d05a1fcfff53391d22ce37a (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years, 2 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 | « net/base/escape.cc ('k') | net/base/trace_net_log_observer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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"},
« no previous file with comments | « net/base/escape.cc ('k') | net/base/trace_net_log_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698