| Index: net/base/net_util_icu_unittest.cc
|
| diff --git a/net/base/net_util_icu_unittest.cc b/net/base/net_util_icu_unittest.cc
|
| index 9beb4349b57d6fcffd78df70d564e387f30bb2a3..c88bda19dcf7013d5f935ee0fb1464b7df80408f 100644
|
| --- a/net/base/net_util_icu_unittest.cc
|
| +++ b/net/base/net_util_icu_unittest.cc
|
| @@ -641,6 +641,36 @@ TEST(NetUtilTest, FormatUrl) {
|
| UnescapeRule::NORMAL, L"http://ftp.google.com/",
|
| 7},
|
|
|
| + // -------- omit default port --------
|
| + {"handle no port to begin with",
|
| + "http://www.google.com/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"http://www.google.com/", 7},
|
| + {"omit default port for http -> 80",
|
| + "http://www.google.com:80/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"http://www.google.com/", 7},
|
| + {"leave port for http -> 81",
|
| + "http://www.google.com:81/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"http://www.google.com:81/", 7},
|
| + {"omit port for https -> 443",
|
| + "https://www.google.com:443/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"https://www.google.com/", 8},
|
| + {"leave port for https -> 80",
|
| + "https://www.google.com:80/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"https://www.google.com:80/", 8},
|
| + {"omit port for ftp -> 21",
|
| + "ftp://www.google.com:21/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"ftp://www.google.com/", 6},
|
| + {"leave port for ftp -> 40",
|
| + "ftp://www.google.com:40/", "en",
|
| + kFormatUrlOmitDefaultPort, UnescapeRule::NORMAL,
|
| + L"ftp://www.google.com:40/", 6},
|
| +
|
| // -------- omit trailing slash on bare hostname --------
|
| {"omit slash when it's the entire path",
|
| "http://www.google.com/", "en",
|
|
|