diff options
author | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-16 11:55:54 +0000 |
---|---|---|
committer | mkosiba@chromium.org <mkosiba@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-08-16 11:55:54 +0000 |
commit | f3e8433d2c16ad7a3a8c6f699d08dd7c05e06cb5 (patch) | |
tree | 55bd03baf2f6b21405036dba9665b16844dc3798 /url | |
parent | 652ad83df9e64c65b37bc0f551e12762aa607520 (diff) | |
download | chromium_src-f3e8433d2c16ad7a3a8c6f699d08dd7c05e06cb5.zip chromium_src-f3e8433d2c16ad7a3a8c6f699d08dd7c05e06cb5.tar.gz chromium_src-f3e8433d2c16ad7a3a8c6f699d08dd7c05e06cb5.tar.bz2 |
Add fragment URL test cases to non-standard base unittest.
This adds two more test cases to the TestResolveRelativeWithNonStandardBase
unittest.
BUG=None
R=brettw@chromium.org
Review URL: https://codereview.chromium.org/22857002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@218002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'url')
-rw-r--r-- | url/url_util_unittest.cc | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/url/url_util_unittest.cc b/url/url_util_unittest.cc index 26d4dc7..8b16d79 100644 --- a/url/url_util_unittest.cc +++ b/url/url_util_unittest.cc @@ -241,22 +241,32 @@ TEST(URLUtilTest, TestResolveRelativeWithNonStandardBase) { // A non-standard hierarchical base is resolved with path URL // canoncialization rules. {"data:/Blah:Blah/", "file.html", true, "data:/Blah:Blah/file.html"}, - {"data:/Path/../part/part2", "file.html", true, "data:/Path/../part/file.html"}, + {"data:/Path/../part/part2", "file.html", true, + "data:/Path/../part/file.html"}, // Path URL canonicalization rules also apply to non-standard authority- // based URLs. - {"custom://Authority/", "file.html", true, "custom://Authority/file.html"}, + {"custom://Authority/", "file.html", true, + "custom://Authority/file.html"}, {"custom://Authority/", "other://Auth/", true, "other://Auth/"}, - {"custom://Authority/", "../../file.html", true, "custom://Authority/file.html"}, - {"custom://Authority/path/", "file.html", true, "custom://Authority/path/file.html"}, - {"custom://Authority:NoCanon/path/", "file.html", true, "custom://Authority:NoCanon/path/file.html"}, + {"custom://Authority/", "../../file.html", true, + "custom://Authority/file.html"}, + {"custom://Authority/path/", "file.html", true, + "custom://Authority/path/file.html"}, + {"custom://Authority:NoCanon/path/", "file.html", true, + "custom://Authority:NoCanon/path/file.html"}, // It's still possible to get an invalid path URL. {"custom://Invalid:!#Auth/", "file.html", false, ""}, // A path with an authority section gets canonicalized under standard URL // rules, even though the base was non-standard. - {"content://content.Provider/", "//other.Provider", true, "content://other.provider/"}, + {"content://content.Provider/", "//other.Provider", true, + "content://other.provider/"}, // Resolving an absolute URL doesn't cause canonicalization of the // result. {"about:blank", "custom://Authority", true, "custom://Authority"}, + // Fragment URLs can be resolved against a non-standard base. + {"scheme://Authority/path", "#fragment", true, + "scheme://Authority/path#fragment"}, + {"scheme://Authority/", "#fragment", true, "scheme://Authority/#fragment"}, // Resolving should fail if the base URL is authority-based but is // missing a path component (the '/' at the end). {"scheme://Authority", "path", false, ""}, |