summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 03:57:39 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-04 03:57:39 +0000
commitc199130efc467a32bcae3fdc1699434303bcac1c (patch)
treeb70fbfbb8b3b039a74e2593a8519f233ad54f356
parent1cd6d7ffcfb20215c225e613a67b39dc5f51c4cf (diff)
downloadchromium_src-c199130efc467a32bcae3fdc1699434303bcac1c.zip
chromium_src-c199130efc467a32bcae3fdc1699434303bcac1c.tar.gz
chromium_src-c199130efc467a32bcae3fdc1699434303bcac1c.tar.bz2
Successor to http://codereview.chromium.org/115748
This change pulls in the new googleurl, which contains the ability to parse partial IPv6 literals. Add a test for chromium's SegmentURL, to verify that it's working. BUG=none TEST=Ran "unit_tests" in Debug and Release mode. Patch by pmarks@google.com git-svn-id: svn://svn.chromium.org/chrome/trunk/src@17598 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--chrome/browser/net/url_fixer_upper_unittest.cc42
2 files changed, 43 insertions, 1 deletions
diff --git a/DEPS b/DEPS
index 0a485dd..75d988d 100644
--- a/DEPS
+++ b/DEPS
@@ -10,7 +10,7 @@ deps = {
"http://google-breakpad.googlecode.com/svn/trunk/src@346",
"src/googleurl":
- "http://google-url.googlecode.com/svn/trunk@105",
+ "http://google-url.googlecode.com/svn/trunk@106",
"src/sdch/open-vcdiff":
"http://open-vcdiff.googlecode.com/svn/trunk@26",
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index 0405935..05ff728 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -108,6 +108,48 @@ static const segment_case segment_cases[] = {
url_parse::Component(), // query
url_parse::Component(), // ref
},
+ // Incomplete IPv6 addresses (will not canonicalize).
+ { "[2001:4860:", "http",
+ url_parse::Component(), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(0, 11), // host
+ url_parse::Component(), // port
+ url_parse::Component(), // path
+ url_parse::Component(), // query
+ url_parse::Component(), // ref
+ },
+ { "[2001:4860:/foo", "http",
+ url_parse::Component(), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(0, 11), // host
+ url_parse::Component(), // port
+ url_parse::Component(11, 4), // path
+ url_parse::Component(), // query
+ url_parse::Component(), // ref
+ },
+ { "http://:b005::68]", "http",
+ url_parse::Component(0, 4), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(7, 10), // host
+ url_parse::Component(), // port
+ url_parse::Component(), // path
+ url_parse::Component(), // query
+ url_parse::Component(), // ref
+ },
+ // Can't do anything useful with this.
+ { ":b005::68]", "",
+ url_parse::Component(0, 0), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(), // host
+ url_parse::Component(), // port
+ url_parse::Component(), // path
+ url_parse::Component(), // query
+ url_parse::Component(), // ref
+ },
};
TEST(URLFixerUpperTest, SegmentURL) {