summaryrefslogtreecommitdiff
path: root/url/url_canon_unittest.cc
diff options
context:
space:
mode:
authorTorne (Richard Coles) <torne@google.com>2013-09-19 22:36:51 +0100
committerTorne (Richard Coles) <torne@google.com>2013-09-19 22:36:51 +0100
commitd0247b1b59f9c528cb6df88b4f2b9afaf80d181e (patch)
tree5c397fadc190cc71bffe2ffad1efc27a5b95309d /url/url_canon_unittest.cc
parentf7571f5f07547e2f3e0addf48d1f2a7ec3632957 (diff)
downloadchromium_org-d0247b1b59f9c528cb6df88b4f2b9afaf80d181e.tar.gz
Merge from Chromium at DEPS revision 224184
This commit was generated by merge_to_master.py. Change-Id: Ia3424df5abed9bea642c522b9e2358dceabd8423
Diffstat (limited to 'url/url_canon_unittest.cc')
-rw-r--r--url/url_canon_unittest.cc5
1 files changed, 5 insertions, 0 deletions
diff --git a/url/url_canon_unittest.cc b/url/url_canon_unittest.cc
index f6cd3a207e..2e93f9244a 100644
--- a/url/url_canon_unittest.cc
+++ b/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.