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

Unified Diff: url/gurl_unittest.cc

Issue 23526048: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: clea Created 7 years, 3 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 | « url/gurl.cc ('k') | url/third_party/mozilla/url_parse.h » ('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 dbf2b96a5ee27cc3e126c838cef04b368d3e921a..2b43eab5d0f167237a07f1eaf0c55910d02d2fe8 100644
--- a/url/gurl_unittest.cc
+++ b/url/gurl_unittest.cc
@@ -308,6 +308,19 @@ TEST(GURLTest, Replacements) {
}
}
+TEST(GURLTest, ClearReplacements) {
+ GURL url(" data: one ? two # three ");
+ GURL::Replacements repl;
+ repl.ClearRef();
+ GURL output = url.ReplaceComponents(repl);
+
+ EXPECT_EQ("data: one ? two ", output.spec());
+
+ GURL importurl(output.spec(), output.parsed_for_possibly_invalid_spec(),
+ output.is_valid());
+ EXPECT_EQ(importurl, output);
+}
+
TEST(GURLTest, PathForRequest) {
struct TestCase {
const char* input;
« no previous file with comments | « url/gurl.cc ('k') | url/third_party/mozilla/url_parse.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698