Skip to content

Commit

Permalink
Add more GURLTest.Resolve examples for clarity.
Browse files Browse the repository at this point in the history
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}
  • Loading branch information
maxbogue authored and Commit bot committed Jan 27, 2015
1 parent c064dda commit ac0afb8
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions url/gurl_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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"},
Expand Down

0 comments on commit ac0afb8

Please sign in to comment.