Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(237)

Unified Diff: src/url_canon_unittest.cc

Issue 600087: When resolving URL, empty relative URL should remove ref component.... (Closed) Base URL: http://google-url.googlecode.com/svn/trunk/
Patch Set: Changed to use Append. Created 10 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/url_canon_relative.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/url_canon_unittest.cc
===================================================================
--- src/url_canon_unittest.cc (revision 121)
+++ src/url_canon_unittest.cc (working copy)
@@ -1736,8 +1736,11 @@
// Basic absolute input.
{"http://host/a", true, false, "http://another/", true, false, false, NULL},
{"http://host/a", true, false, "http:////another/", true, false, false, NULL},
- // Empty relative URLs shouldn't change the input.
+ // Empty relative URLs should only remove the ref part of the URL,
+ // leaving the rest unchanged.
{"http://foo/bar", true, false, "", true, true, true, "http://foo/bar"},
+ {"http://foo/bar#ref", true, false, "", true, true, true, "http://foo/bar"},
+ {"http://foo/bar#", true, false, "", true, true, true, "http://foo/bar"},
// Spaces at the ends of the relative path should be ignored.
{"http://foo/bar", true, false, " another ", true, true, true, "http://foo/another"},
{"http://foo/bar", true, false, " . ", true, true, true, "http://foo/"},
« no previous file with comments | « src/url_canon_relative.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698