From ac0afb8657e49b1f792bd19d6f0acf805c28f49a Mon Sep 17 00:00:00 2001 From: maxbogue Date: Mon, 26 Jan 2015 19:10:49 -0800 Subject: 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} --- url/gurl_unittest.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'url') 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"}, -- cgit v1.1