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

Unified Diff: url/gurl_unittest.cc

Issue 2794303002: Deprecate resource requests whose URLs contain raw newlines. (Closed)
Patch Set: Rebase. Created 3 years, 8 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 | « tools/metrics/histograms/histograms.xml ('k') | url/third_party/mozilla/url_parse.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/gurl_unittest.cc
diff --git a/url/gurl_unittest.cc b/url/gurl_unittest.cc
index 258ea03e0b2d7e2587fb316f6f69c7f8d14cbe2c..d3a59de830b36790db954cd935cfe17179aa492b 100644
--- a/url/gurl_unittest.cc
+++ b/url/gurl_unittest.cc
@@ -645,10 +645,12 @@ TEST(GURLTest, Newlines) {
// Constructor.
GURL url_1(" \t ht\ntp://\twww.goo\rgle.com/as\ndf \n ");
EXPECT_EQ("http://www.google.com/asdf", url_1.spec());
+ EXPECT_TRUE(url_1.parsed_for_possibly_invalid_spec().whitespace_removed);
// Relative path resolver.
GURL url_2 = url_1.Resolve(" \n /fo\to\r ");
EXPECT_EQ("http://www.google.com/foo", url_2.spec());
+ EXPECT_TRUE(url_2.parsed_for_possibly_invalid_spec().whitespace_removed);
// Note that newlines are NOT stripped from ReplaceComponents.
}
« no previous file with comments | « tools/metrics/histograms/histograms.xml ('k') | url/third_party/mozilla/url_parse.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698