diff options
author | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 03:41:51 +0000 |
---|---|---|
committer | hbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-05 03:41:51 +0000 |
commit | 90f933a3b3ce799ebd2f1e04c8906ba0c6f514d9 (patch) | |
tree | 6baaad8528a0bc8cf45df75ef3dd69c60ccb99a4 /chrome/browser | |
parent | 3a164a1633cc2c8136aa385223a8ebdbda407150 (diff) | |
download | chromium_src-90f933a3b3ce799ebd2f1e04c8906ba0c6f514d9.zip chromium_src-90f933a3b3ce799ebd2f1e04c8906ba0c6f514d9.tar.gz chromium_src-90f933a3b3ce799ebd2f1e04c8906ba0c6f514d9.tar.bz2 |
Fixes Issue 7377: Regression: Omnibox trims URL ending with 0x85 (Take 2)
This is the same change as "http://codereview.chromium.org/20219/show", which I reverted it because it caused build breaks on sandbox. To investigate this build break, it seems this build break is somehow caused by "base/string_util.cc" that includes the TrimWhiteSpaceUTF8() function. To fix this build break, I moved the TrimWhiteSpaceUTF8() function to "base/string_util_icu.cc".
BUG=7377
Review URL: http://codereview.chromium.org/28310
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10970 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser')
-rw-r--r-- | chrome/browser/net/url_fixer_upper.cc | 2 | ||||
-rw-r--r-- | chrome/browser/net/url_fixer_upper_unittest.cc | 20 |
2 files changed, 21 insertions, 1 deletions
diff --git a/chrome/browser/net/url_fixer_upper.cc b/chrome/browser/net/url_fixer_upper.cc index 121807b..5d28a9d 100644 --- a/chrome/browser/net/url_fixer_upper.cc +++ b/chrome/browser/net/url_fixer_upper.cc @@ -265,7 +265,7 @@ string URLFixerUpper::SegmentURL(const string& text, *parts = url_parse::Parsed(); string trimmed; - TrimWhitespace(text, TRIM_ALL, &trimmed); + TrimWhitespaceUTF8(text, TRIM_ALL, &trimmed); if (trimmed.empty()) return string(); // Nothing to segment. diff --git a/chrome/browser/net/url_fixer_upper_unittest.cc b/chrome/browser/net/url_fixer_upper_unittest.cc index 1e6dbc7..b758d625 100644 --- a/chrome/browser/net/url_fixer_upper_unittest.cc +++ b/chrome/browser/net/url_fixer_upper_unittest.cc @@ -177,6 +177,26 @@ struct fixup_case { {"ftpblah.google.com", "", "http://ftpblah.google.com/"}, {"ftp", "", "http://ftp/"}, {"google.ftp.com", "", "http://google.ftp.com/"}, + // URLs which end with 0x85 (NEL in ISO-8859). + { "http://google.com/search?q=\xd0\x85", "", + "http://google.com/search?q=\xd0\x85" + }, + { "http://google.com/search?q=\xec\x97\x85", "", + "http://google.com/search?q=\xec\x97\x85" + }, + { "http://google.com/search?q=\xf0\x90\x80\x85", "", + "http://google.com/search?q=\xf0\x90\x80\x85" + }, + // URLs which end with 0xA0 (non-break space in ISO-8859). + { "http://google.com/search?q=\xd0\xa0", "", + "http://google.com/search?q=\xd0\xa0" + }, + { "http://google.com/search?q=\xec\x97\xa0", "", + "http://google.com/search?q=\xec\x97\xa0" + }, + { "http://google.com/search?q=\xf0\x90\x80\xa0", "", + "http://google.com/search?q=\xf0\x90\x80\xa0" + }, }; TEST(URLFixerUpperTest, FixupURL) { |