diff options
author | maxbogue <maxbogue@chromium.org> | 2015-01-26 19:10:49 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-01-27 03:12:03 +0000 |
commit | ac0afb8657e49b1f792bd19d6f0acf805c28f49a (patch) | |
tree | dd04ea8fad9323ec65de41e7455863d66dfea0dd /url | |
parent | c064ddad5554afe987ef088d4bf1165cc7eda74e (diff) | |
download | chromium_src-ac0afb8657e49b1f792bd19d6f0acf805c28f49a.zip chromium_src-ac0afb8657e49b1f792bd19d6f0acf805c28f49a.tar.gz chromium_src-ac0afb8657e49b1f792bd19d6f0acf805c28f49a.tar.bz2 |
Add more GURLTest.Resolve examples for clarity.
I was confused about how this worked when writing
http://crrev.com/864993002 and none of the existing
examples clarified it. Is there a utility method that will
just always append to the path? like "a.com/b" and "c"
makes "a.com/b/c"?
Review URL: https://codereview.chromium.org/870413005
Cr-Commit-Position: refs/heads/master@{#313216}
Diffstat (limited to 'url')
-rw-r--r-- | url/gurl_unittest.cc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/url/gurl_unittest.cc b/url/gurl_unittest.cc index a699189..bea1a0c 100644 --- a/url/gurl_unittest.cc +++ b/url/gurl_unittest.cc @@ -281,6 +281,9 @@ TEST(GURLTest, Resolve) { const char* expected; } resolve_cases[] = { {"http://www.google.com/", "foo.html", true, "http://www.google.com/foo.html"}, + {"http://www.google.com/foo/", "bar", true, "http://www.google.com/foo/bar"}, + {"http://www.google.com/foo/", "/bar", true, "http://www.google.com/bar"}, + {"http://www.google.com/foo", "bar", true, "http://www.google.com/bar"}, {"http://www.google.com/", "http://images.google.com/foo.html", true, "http://images.google.com/foo.html"}, {"http://www.google.com/blah/bloo?c#d", "../../../hello/./world.html?a#b", true, "http://www.google.com/hello/world.html?a#b"}, {"http://www.google.com/foo#bar", "#com", true, "http://www.google.com/foo#com"}, |