Index: url/url_util_unittest.cc |
diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc |
index 17c1b0f6b254a1f8a55f6f29bb30b4cdbec725d4..73ff93b8a1912c7e712cf411742f9553cbafd0d7 100644 |
--- a/url/url_util_unittest.cc |
+++ b/url/url_util_unittest.cc |
@@ -273,6 +273,15 @@ TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) { |
// any URL scheme is we might break javascript: URLs by doing so... |
{"javascript:alert('foo#bar')", "#badfrag", true, |
"javascript:alert('foo#badfrag" }, |
+ // In this case, the backslashes will not be canonicalized because it's a |
+ // non-standard URL, but they will be treated as a path separators, |
+ // giving the base URL here a path of "\". |
+ // |
+ // The result here is somewhat arbitrary. One could argue it should be |
+ // either "aaa://a\" or "aaa://a/" since the path is being replaced with |
+ // the "current directory". But in the context of resolving on data URLs, |
+ // adding the requested dot doesn't seem wrong either. |
+ {"aaa://a\\", "aaa:.", true, "aaa://a\\." } |
}; |
for (size_t i = 0; i < arraysize(resolve_non_standard_cases); i++) { |