summaryrefslogtreecommitdiffstats
path: root/base/utf_string_conversions_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* Revert 184352brettw@chromium.org2013-02-241-1/+1
| | | | | | | | | | | | | | | | | > Add utf_string_conversions to base namespace. > > This adds "using"s for all functions so those can be fixed in a separate pass. > > This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. > > BUG= > > Review URL: https://codereview.chromium.org/12314090 TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/12315071 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184355 0039d316-1c4b-4281-b951-d872f2087c98
* Add utf_string_conversions to base namespace.brettw@chromium.org2013-02-241-1/+1
| | | | | | | | | | | | This adds "using"s for all functions so those can be fixed in a separate pass. This converts the "Wide" versions of the functions in the Chrome directory as a first pass on the changeover. BUG= Review URL: https://codereview.chromium.org/12314090 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@184352 0039d316-1c4b-4281-b951-d872f2087c98
* clang/mac: Fix almost all problems when building all.xcodeproj.thakis@chromium.org2010-10-041-21/+0
| | | | | | | | BUG=None TEST=None TBR=hans git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61344 0039d316-1c4b-4281-b951-d872f2087c98
* Header cleanup in base.brettw@chromium.org2010-08-171-1/+2
| | | | | | | | | | | | | | This makes uses of StringPrintf and friends use the base namespace and include stringprintf.h explicitly. This also removes a bunch of unnecessary string_util includes (which exposed a few other errors like people forgetting to include <vector>. TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/3119022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56446 0039d316-1c4b-4281-b951-d872f2087c98
* base: string_util.h -> utf_string_conversions.h fix.jhawkins@chromium.org2010-03-091-2/+4
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/678001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@40972 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 36459 - Breaks 7 WebKit testsjschuh@chromium.org2010-01-161-10/+10
| | | | | | | | | | | | | | | | | | | | | | Changes are: * base::IsValidCodepoint() now returns false on noncharacter code points. * base::IsStringUTF8() now uses ICU library (removed old Mozilla implementation). * Removed base::IsStringWideUTF8() (was unused and confusing) * file_util::ReplaceIllegalCharactersInPath() now treats Unicode replacement character (U+FFFD) as invalid. * Associated unit tests updated. BUG=2759 BUG=30662 TEST=base_unittests gtest_filter=StringUtilTest.IsStringUTF8 TEST=base_unittests gtest_filter=UTFStringConversionsTest.* TEST=base_unittests gtest_filter=FileUtilICUTestReplaceIllegalCharactersInPathTest Review URL: http://codereview.chromium.org/548017 TBR=jschuh@chromium.org Review URL: http://codereview.chromium.org/552026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36460 0039d316-1c4b-4281-b951-d872f2087c98
* Changes are:jschuh@chromium.org2010-01-161-10/+10
| | | | | | | | | | | | | | | | | * base::IsValidCodepoint() now returns false on non-character code points. * base::IsStringUTF8() now uses ICU library (removed old Mozilla implementation). * Removed base::IsStringWideUTF8() (was unused and confusing) * file_util::ReplaceIllegalCharactersInPath() now treats Unicode replacement character (U+FFFD) as invalid. * Associated unit tests updated. BUG=2759 BUG=30662 TEST=base_unittests --gtest_filter=StringUtilTest.IsStringUTF8 TEST=base_unittests --gtest_filter=UTFStringConversionsTest.* TEST=base_unittests --gtest_filter=FileUtilICUTestReplaceIllegalCharactersInPathTest Review URL: http://codereview.chromium.org/548017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36459 0039d316-1c4b-4281-b951-d872f2087c98
* If we can't read a unicode character, write the standard "unknown" (0xFFFD) ↵cevans@chromium.org2010-01-011-9/+9
| | | | | | | | | | | character. This will prevent security issues where the current behaviour can be used to strip characters out of a string after it has passed some validation. BUG=30798 TEST=utf_string_conversions_unittest.cc,utf_offset_string_conversions_unittest.cc,zip_unittest.cc Review URL: http://codereview.chromium.org/522029 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35430 0039d316-1c4b-4281-b951-d872f2087c98
* Split *AndAdjustOffset() functions into their own header, to restore ↵pkasting@chromium.org2009-11-131-43/+0
| | | | | | | | | | utf_string_conversions.h to a simple, readable state. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/387012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31928 0039d316-1c4b-4281-b951-d872f2087c98
* Clean up recent string conversion function changes, part 1: Remove ↵pkasting@chromium.org2009-11-101-35/+1
| | | | | | | | | | | | unnecessary code. Thanks to a change in escape.cc I can basically revert the ICU conversions back to what they used to be; I can also get rid of half the conversions immediately since they aren't used. This does not split out the "adjust" versions of the UTF conversions into their own header/implementation; that's coming in the next patch. BUG=4010 TEST=none Review URL: http://codereview.chromium.org/380007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31533 0039d316-1c4b-4281-b951-d872f2087c98
* Fix various problems with inline autocomplete and URLs that change length ↵pkasting@chromium.org2009-11-071-0/+306
during fixup: * URLs with http auth info, which gets stripped * URLs with IDN hosts * URLs with escaped values that get unescaped In cases like these, we'd inline autocomplete from the wrong locations, highlight the wrong portions of the URL as matches, and sometimes DCHECK() in debug mode. The fix is to track how fixup affects the offsets into the URL we care about. Plumbing this required an enormous number of additions :( There is also a fix here to the URL Fixer Upper, which was obviously modified at some point in the past to use the Parsed components, but without updating the comments or some of the functionality to match. Since this isn't supposed to "fix up" things that aren't simple typos, I removed some code to "fix" bogus ports, which was causing bizarre effects when typing HTTP auth URLs ("http://foo:bar" would be fixed to "http://foo" and then matched for inline autocompletion, which was clearly wrong). This is tested incidentally by one of the new History URL Provider tests (which is how I discovered it). BUG=4010 TEST=Covered by unittests Review URL: http://codereview.chromium.org/372017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@31352 0039d316-1c4b-4281-b951-d872f2087c98