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

Unified Diff: components/safe_browsing_db/v4_protocol_manager_util_unittest.cc

Issue 2397873002: Reject some previuosly-escaped chars in hostnames.
Patch Set: Some tests fixed Created 4 years, 1 month 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
Index: components/safe_browsing_db/v4_protocol_manager_util_unittest.cc
diff --git a/components/safe_browsing_db/v4_protocol_manager_util_unittest.cc b/components/safe_browsing_db/v4_protocol_manager_util_unittest.cc
index f3effaba41374b9759b7eae74be751070db02a86..aaaacd3dfbfb688938f793228f25c34bf0b468e0 100644
--- a/components/safe_browsing_db/v4_protocol_manager_util_unittest.cc
+++ b/components/safe_browsing_db/v4_protocol_manager_util_unittest.cc
@@ -205,15 +205,13 @@ TEST_F(V4ProtocolManagerUtilTest, CanonicalizeUrl) {
{"http://notrailingslash.com", "notrailingslash.com", "/", ""},
{"http://www.gotaport.com:1234/", "www.gotaport.com", "/", ""},
{" http://www.google.com/ ", "www.google.com", "/", ""},
- {"http:// leadingspace.com/", "%20leadingspace.com", "/", ""},
- {"http://%20leadingspace.com/", "%20leadingspace.com", "/", ""},
{"https://www.securesite.com/", "www.securesite.com", "/", ""},
{"http://host.com/ab%23cd", "host.com", "/ab%23cd", ""},
- {"http://host%3e.com//twoslashes?more//slashes", "host>.com",
+ {"http://host%5A.com//twoslashes?more//slashes", "hostz.com",
"/twoslashes", "more//slashes"},
{"http://host.com/abc?val=xyz#anything", "host.com", "/abc", "val=xyz"},
{"http://abc:def@host.com/xyz", "host.com", "/xyz", ""},
- {"http://host%3e.com/abc/%2e%2e%2fdef", "host>.com", "/def", ""},
+ {"http://host%5a.com/abc/%2e%2e%2fdef", "hostz.com", "/def", ""},
{"http://.......host...com.....//abc/////def%2F%2F%2Fxyz", "host.com",
"/abc/def/xyz", ""},
{"ftp://host.com/foo?bar", "host.com", "/foo", "bar"},
« no previous file with comments | « components/safe_browsing_db/v4_protocol_manager_util.cc ('k') | components/search_engines/template_url_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698