summaryrefslogtreecommitdiff
path: root/chromium/url/url_canon_unittest.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/url/url_canon_unittest.cc')
-rw-r--r--chromium/url/url_canon_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/chromium/url/url_canon_unittest.cc b/chromium/url/url_canon_unittest.cc
index f6cd3a207e1..2e93f9244ae 100644
--- a/chromium/url/url_canon_unittest.cc
+++ b/chromium/url/url_canon_unittest.cc
@@ -2001,6 +2001,11 @@ TEST(URLCanonTest, ResolveRelativeURL) {
// is not file.
{"http://host/a", true, false, "/c:\\foo", true, true, true, "http://host/c:/foo"},
{"http://host/a", true, false, "//c:\\foo", true, true, true, "http://c/foo"},
+ // Ensure that ports aren't allowed for hosts relative to a file url.
+ // Although the result string shows a host:port portion, the call to
+ // resolve the relative URL returns false, indicating parse failure,
+ // which is what is required.
+ {"file:///foo.txt", true, true, "//host:80/bar.txt", true, true, false, "file://host:80/bar.txt"},
// Filesystem URL tests; filesystem URLs are only valid and relative if
// they have no scheme, e.g. "./index.html". There's no valid equivalent
// to http:index.html.