summaryrefslogtreecommitdiffstats
path: root/chromium/url/url_canon_unittest.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <[email protected]>2015-09-28 18:37:14 +0200
committerAllan Sandfeld Jensen <[email protected]>2015-09-29 07:47:06 +0000
commit0e8ff63a407fe323e215bb1a2c423c09a4747c8a (patch)
treee27e357e125d2d705bd504e1e3c8a3da1ed20f1d /chromium/url/url_canon_unittest.cc
parentc3d0bb5bb15d008606b18b865841e19cd9bb5847 (diff)
BASELINE: Update chromium to 45.0.2454.101upstream-45
Also adds web_cache component Change-Id: I51238ceea8ee99854cc4989ae70a4fc2fc6bedcb Reviewed-by: Kai Koehne <[email protected]>
Diffstat (limited to 'chromium/url/url_canon_unittest.cc')
-rw-r--r--chromium/url/url_canon_unittest.cc15
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/url/url_canon_unittest.cc b/chromium/url/url_canon_unittest.cc
index 67cced24607..f2247d1dd9d 100644
--- a/chromium/url/url_canon_unittest.cc
+++ b/chromium/url/url_canon_unittest.cc
@@ -1059,6 +1059,21 @@ TEST(URLCanonTest, Path) {
{"/%7Ffp3%3Eju%3Dduvgw%3Dd", L"/%7Ffp3%3Eju%3Dduvgw%3Dd", "/%7Ffp3%3Eju%3Dduvgw%3Dd", Component(0, 24), true},
// @ should be passed through unchanged (escaped or unescaped).
{"/@asdf%40", L"/@asdf%40", "/@asdf%40", Component(0, 9), true},
+ // Nested escape sequences should result in escaping the leading '%' if
+ // unescaping would result in a new escape sequence.
+ {"/%A%42", L"/%A%42", "/%25AB", Component(0, 6), true},
+ {"/%%41B", L"/%%41B", "/%25AB", Component(0, 6), true},
+ {"/%%41%42", L"/%%41%42", "/%25AB", Component(0, 6), true},
+ // Make sure truncated "nested" escapes don't result in reading off the
+ // string end.
+ {"/%%41", L"/%%41", "/%A", Component(0, 3), true},
+ // Don't unescape the leading '%' if unescaping doesn't result in a valid
+ // new escape sequence.
+ {"/%%470", L"/%%470", "/%G0", Component(0, 4), true},
+ {"/%%2D%41", L"/%%2D%41", "/%-A", Component(0, 4), true},
+ // Don't erroneously downcast a UTF-16 charater in a way that makes it
+ // look like part of an escape sequence.
+ {NULL, L"/%%41\x0130", "/%A%C4%B0", Component(0, 9), true},
// ----- encoding tests -----
// Basic conversions