diff options
author | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 02:37:40 +0000 |
---|---|---|
committer | pkasting@chromium.org <pkasting@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-02 02:37:40 +0000 |
commit | 79845effcd569cb61784e8a8c221f839e6e23525 (patch) | |
tree | d86e942097765499876b48a5d764592e2b9c376f /app | |
parent | 9902c201466fe4a701f43a124f4d22b6829c87e6 (diff) | |
download | chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.zip chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.tar.gz chromium_src-79845effcd569cb61784e8a8c221f839e6e23525.tar.bz2 |
Strip the trailing slash from URLs like "http://google.com/". This especially helps when the scheme has also been stripped, as it makes the hostname look less unbalanced. We're careful to avoid stripping the slash when doing so would confuse the omnibox.
This also moves to more aggressive stripping and/or unescaping in several places. In general, it seems like we should be as aggressive as is feasible.
BUG=43587
TEST=Visit google.com. There should be no slash in the address bar.
Review URL: http://codereview.chromium.org/2389002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48691 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'app')
-rw-r--r-- | app/text_elider_unittest.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/text_elider_unittest.cc b/app/text_elider_unittest.cc index 0eacfd2..30c494f 100644 --- a/app/text_elider_unittest.cc +++ b/app/text_elider_unittest.cc @@ -91,7 +91,7 @@ TEST(TextEliderTest, TestMoreEliding) { {"", L""}, {"http://foo.bar..example.com...hello/test/filename.html", L"foo.bar..example.com...hello/" + kEllipsisStr + L"/filename.html"}, - {"http://foo.bar../", L"foo.bar../"}, + {"http://foo.bar../", L"foo.bar.."}, {"http://xn--1lq90i.cn/foo", L"\x5317\x4eac.cn/foo"}, {"http://me:mypass@secrethost.com:99/foo?bar#baz", L"secrethost.com:99/foo?bar#baz"}, @@ -251,8 +251,8 @@ TEST(TextEliderTest, ElideTextLongStrings) { // Verifies display_url is set correctly. TEST(TextEliderTest, SortedDisplayURL) { - gfx::SortedDisplayURL d_url(GURL("http://www.google.com/"), std::wstring()); - EXPECT_EQ("www.google.com/", UTF16ToASCII(d_url.display_url())); + gfx::SortedDisplayURL d_url(GURL("http://www.google.com"), std::wstring()); + EXPECT_EQ("www.google.com", UTF16ToASCII(d_url.display_url())); } // Verifies DisplayURL::Compare works correctly. |