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

Unified Diff: chrome/browser/net/url_fixer_upper_unittest.cc

Issue 7068007: Revise about: and chrome: url handling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 9 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
Index: chrome/browser/net/url_fixer_upper_unittest.cc
diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc
index bf08dc657cfa88560495a0b65620243201d64f3e..dae9ff5ee2e2caf6044b33d3080bb5186f7e6ab6 100644
--- a/chrome/browser/net/url_fixer_upper_unittest.cc
+++ b/chrome/browser/net/url_fixer_upper_unittest.cc
@@ -57,12 +57,52 @@ static const segment_case segment_cases[] = {
url_parse::Component(0, 5), // scheme
url_parse::Component(), // username
url_parse::Component(), // password
- url_parse::Component(), // host
+ url_parse::Component(6, 7), // host
url_parse::Component(), // port
url_parse::Component(), // path
url_parse::Component(), // query
url_parse::Component(), // ref
},
+ { "about:host/path?query#ref", "about",
+ url_parse::Component(0, 5), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(6, 4), // host
+ url_parse::Component(), // port
+ url_parse::Component(10, 5), // path
+ url_parse::Component(16, 5), // query
+ url_parse::Component(22, 3), // ref
+ },
+ { "about://host/path?query#ref", "about",
+ url_parse::Component(0, 5), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(8, 4), // host
+ url_parse::Component(), // port
+ url_parse::Component(12, 5), // path
+ url_parse::Component(18, 5), // query
+ url_parse::Component(24, 3), // ref
+ },
+ { "chrome:host/path?query#ref", "chrome",
+ url_parse::Component(0, 6), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(7, 4), // host
+ url_parse::Component(), // port
+ url_parse::Component(11, 5), // path
+ url_parse::Component(17, 5), // query
+ url_parse::Component(23, 3), // ref
+ },
+ { "chrome://host/path?query#ref", "chrome",
+ url_parse::Component(0, 6), // scheme
+ url_parse::Component(), // username
+ url_parse::Component(), // password
+ url_parse::Component(9, 4), // host
+ url_parse::Component(), // port
+ url_parse::Component(13, 5), // path
+ url_parse::Component(19, 5), // query
+ url_parse::Component(25, 3), // ref
+ },
{ " www.google.com:124?foo#", "http",
url_parse::Component(), // scheme
url_parse::Component(), // username

Powered by Google App Engine
This is Rietveld 408576698