summaryrefslogtreecommitdiffstats
path: root/url/url_canon_unittest.cc
diff options
context:
space:
mode:
authortsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-03 21:21:35 +0000
committertsepez@chromium.org <tsepez@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-03 21:21:35 +0000
commit45172e6e478a359eba9c05bc72dd0b4c241a65c8 (patch)
tree00c8a15240c6af03b59710151facdf4bb740c167 /url/url_canon_unittest.cc
parentfc3fe9dc64bc6ebaa3c9767e1eef54142f9fb46a (diff)
downloadchromium_src-45172e6e478a359eba9c05bc72dd0b4c241a65c8.zip
chromium_src-45172e6e478a359eba9c05bc72dd0b4c241a65c8.tar.gz
chromium_src-45172e6e478a359eba9c05bc72dd0b4c241a65c8.tar.bz2
Prevent URLs with invalid schemes from resolving as relative to data: URLs.
There is a missing bit of logic when the scheme is invalid that is present in the case where the scheme is empty. Either way, we can't consider this a relative URL if the base scheme isn't heirarchical. BUG=346132 Review URL: https://codereview.chromium.org/177093008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@254565 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url/url_canon_unittest.cc')
-rw-r--r--url/url_canon_unittest.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/url/url_canon_unittest.cc b/url/url_canon_unittest.cc
index 2275429..9997afa 100644
--- a/url/url_canon_unittest.cc
+++ b/url/url_canon_unittest.cc
@@ -2072,6 +2072,7 @@ TEST(URLCanonTest, ResolveRelativeURL) {
{"http://foo/bar", true, false, ":foo", true, true, true, "http://foo/:foo"},
{"http://foo/bar", true, false, " hello world", true, true, true, "http://foo/hello%20world"},
{"data:asdf", false, false, ":foo", false, false, false, NULL},
+ {"data:asdf", false, false, "bad(':foo')", false, false, false, NULL},
// We should treat semicolons like any other character in URL resolving
{"http://host/a", true, false, ";foo", true, true, true, "http://host/;foo"},
{"http://host/a;", true, false, ";foo", true, true, true, "http://host/;foo"},