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

Unified Diff: src/url_canon_unittest.cc

Issue 149588: Require hosts for non-file URLs. (Closed) Base URL: http://google-url.googlecode.com/svn/trunk/
Patch Set: '' Created 11 years, 5 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_stdurl.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 107)
+++ src/url_canon_unittest.cc (working copy)
@@ -781,6 +781,7 @@
{"http://foo:@host.com/", "foo@", url_parse::Component(0, 3), url_parse::Component(0, -1), true},
{"http://:foo@host.com/", ":foo@", url_parse::Component(0, 0), url_parse::Component(1, 3), true},
{"http://^ :$\t@host.com/", "%5E%20:$%09@", url_parse::Component(0, 6), url_parse::Component(7, 4), true},
+ {"http://user:pass@/", "user:pass@", url_parse::Component(0, 4), url_parse::Component(5, 4), true},
// IE7 compatability: old versions allowed backslashes in usernames, but
// IE7 does not. We disallow it as well.
@@ -1183,6 +1184,7 @@
{"www.google.com", ":www.google.com/", true},
{"http://192.0x00A80001", "http://192.168.0.1/", true},
{"http://www/foo%2Ehtml", "http://www/foo.html", true},
+ {"http://user:pass@/", "http://user:pass@/", false},
// Backslashes should get converted to forward slashes.
{"http:\\\\www.google.com\\foo", "http://www.google.com/foo", true},
« no previous file with comments | « src/url_canon_stdurl.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698