| Index: url/url_util_unittest.cc
|
| diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc
|
| index 8b16d796cf1c027e10386318b5d742aa40fb8a67..32acea477771f3d521dae8d9c76bd95050c2a1af 100644
|
| --- a/url/url_util_unittest.cc
|
| +++ b/url/url_util_unittest.cc
|
| @@ -270,13 +270,20 @@ TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) {
|
| // Resolving should fail if the base URL is authority-based but is
|
| // missing a path component (the '/' at the end).
|
| {"scheme://Authority", "path", false, ""},
|
| + // Test resolving a fragment (only) against any kind of base-URL.
|
| + {"about:blank", "#id42", true, "about:blank#id42" },
|
| + {"about:blank#oldfrag", "#newfrag", true, "about:blank#newfrag" },
|
| + // A surprising side effect of allowing fragments to resolve against
|
| + // any URL scheme is we might break javascript: URLs by doing so...
|
| + {"javascript:alert('foo#bar')", "#badfrag", true,
|
| + "javascript:alert('foo#badfrag" },
|
| };
|
|
|
| for (size_t i = 0; i < ARRAYSIZE_UNSAFE(resolve_non_standard_cases); i++) {
|
| const ResolveRelativeCase& test_data = resolve_non_standard_cases[i];
|
| url_parse::Parsed base_parsed;
|
| url_parse::ParsePathURL(test_data.base, strlen(test_data.base),
|
| - &base_parsed);
|
| + &base_parsed, false);
|
|
|
| std::string resolved;
|
| url_canon::StdStringCanonOutput output(&resolved);
|
|
|