Commit ac0afb86 authored by maxbogue's avatar maxbogue Committed by Commit bot

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}
parent c064ddad
...@@ -281,6 +281,9 @@ TEST(GURLTest, Resolve) { ...@@ -281,6 +281,9 @@ TEST(GURLTest, Resolve) {
const char* expected; const char* expected;
} resolve_cases[] = { } resolve_cases[] = {
{"http://www.google.com/", "foo.html", true, "http://www.google.com/foo.html"}, {"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/", "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/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"}, {"http://www.google.com/foo#bar", "#com", true, "http://www.google.com/foo#com"},
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment