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

Unified Diff: src/url_parse_unittest.cc

Issue 115748: url_parse: Segment partially-typed IPv6 literals.... (Closed) Base URL: http://google-url.googlecode.com/svn/trunk/
Patch Set: '' Created 11 years, 7 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_parse.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/url_parse_unittest.cc
===================================================================
--- src/url_parse_unittest.cc (revision 104)
+++ src/url_parse_unittest.cc (working copy)
@@ -309,11 +309,21 @@
{"http://foo/abcd?efgh?ijkl", "http", NULL, NULL, "foo", -1, "/abcd", "efgh?ijkl", NULL},
{"http://foo/abcd#foo?bar", "http", NULL, NULL, "foo", -1, "/abcd", NULL, "foo?bar"},
- // IPV6, check also interesting uses of colons.
+ // IPv6, check also interesting uses of colons.
{"[61:24:74]:98", "[61", NULL, NULL, "24:74]", 98, NULL, NULL, NULL},
{"http://[61:27]:98", "http", NULL, NULL, "[61:27]", 98, NULL, NULL, NULL},
{"http:[61:27]/:foo", "http", NULL, NULL, "[61:27]", -1, "/:foo", NULL, NULL},
+{"http://[1::2]:3:4", "http", NULL, NULL, "[1::2]:3", 4, NULL, NULL, NULL},
+ // Partially-complete IPv6 literals, and related cases.
+{"http://2001::1", "http", NULL, NULL, "2001:", 1, NULL, NULL, NULL},
+{"http://[2001::1", "http", NULL, NULL, "[2001::1", -1, NULL, NULL, NULL},
+{"http://2001::1]", "http", NULL, NULL, "2001::1]", -1, NULL, NULL, NULL},
+{"http://2001::1]:80", "http", NULL, NULL, "2001::1]", 80, NULL, NULL, NULL},
+{"http://[2001::1]", "http", NULL, NULL, "[2001::1]", -1, NULL, NULL, NULL},
+{"http://[2001::1]:80", "http", NULL, NULL, "[2001::1]", 80, NULL, NULL, NULL},
+{"http://[[::]]", "http", NULL, NULL, "[[::]]", -1, NULL, NULL, NULL},
+
};
TEST(URLParser, Standard) {
« no previous file with comments | « src/url_parse.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698