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

Unified Diff: url/url_parse_unittest.cc

Issue 23835019: Support URL fragment resolution againt non-hierarchical schemes (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: brettw2 Created 7 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
« no previous file with comments | « url/url_parse_internal.h ('k') | url/url_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: url/url_parse_unittest.cc
diff --git a/url/url_parse_unittest.cc b/url/url_parse_unittest.cc
index ad47616128d510b15e81173069d1c845fc725034..f080fb585db14565927b3604c1a2914f9a3b3f68 100644
--- a/url/url_parse_unittest.cc
+++ b/url/url_parse_unittest.cc
@@ -343,11 +343,11 @@ static PathURLParseCase path_cases[] = {
{":", "", NULL},
{":/", "", "/"},
{"/", NULL, "/"},
-{" This is \\interesting// \t", NULL, "This is \\interesting//"},
+{" This is \\interesting// \t", NULL, "This is \\interesting// \t"},
{"about:", "about", NULL},
{"about:blank", "about", "blank"},
-{" about: blank ", "about", " blank"},
-{"javascript :alert(\"He:/l\\l#o?foo\"); ", "javascript ", "alert(\"He:/l\\l#o?foo\");"},
+{" about: blank ", "about", " blank "},
+{"javascript :alert(\"He:/l\\l#o?foo\"); ", "javascript ", "alert(\"He:/l\\l#o?foo\"); "},
};
TEST(URLParser, PathURL) {
@@ -356,18 +356,18 @@ TEST(URLParser, PathURL) {
url_parse::Parsed parsed;
for (size_t i = 0; i < arraysize(path_cases); i++) {
const char* url = path_cases[i].input;
- url_parse::ParsePathURL(url, static_cast<int>(strlen(url)), &parsed);
+ url_parse::ParsePathURL(url, static_cast<int>(strlen(url)), false, &parsed);
- EXPECT_TRUE(ComponentMatches(url, path_cases[i].scheme, parsed.scheme));
- EXPECT_TRUE(ComponentMatches(url, path_cases[i].path, parsed.path));
+ EXPECT_TRUE(ComponentMatches(url, path_cases[i].scheme, parsed.scheme))
+ << i;
+ EXPECT_TRUE(ComponentMatches(url, path_cases[i].path, parsed.GetContent()))
+ << i;
// The remaining components are never used for path urls.
ExpectInvalidComponent(parsed.username);
ExpectInvalidComponent(parsed.password);
ExpectInvalidComponent(parsed.host);
ExpectInvalidComponent(parsed.port);
- ExpectInvalidComponent(parsed.query);
- ExpectInvalidComponent(parsed.ref);
}
}
« no previous file with comments | « url/url_parse_internal.h ('k') | url/url_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698