summaryrefslogtreecommitdiffstats
path: root/chrome
diff options
context:
space:
mode:
authorhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 07:01:15 +0000
committerhbono@chromium.org <hbono@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-06-29 07:01:15 +0000
commita7665f53ca99cabd05dafa8460dd4a123779830a (patch)
tree0d0da53771015c90d7bb8a14648227f815252398 /chrome
parent14e60c8d78e36e0d8cd224dd907ebc350c6c4f06 (diff)
downloadchromium_src-a7665f53ca99cabd05dafa8460dd4a123779830a.zip
chromium_src-a7665f53ca99cabd05dafa8460dd4a123779830a.tar.gz
chromium_src-a7665f53ca99cabd05dafa8460dd4a123779830a.tar.bz2
A quick fix for Issue 13432.
This is caused by my bonehead mistake that I forgot filtering out U_STRING_NOT_TERMINATED_WARNING while checking the return value in SpellCheckWordIterator::Normalize() in my change r10087. I have added code that checks if the result value is U_STRING_NOT_TERMINATED_WARNING and added a couple of test cases which verify this issue. BUG=13432 "Any word of 13 or 14 characters is not spellcheck" TEST=run unit_test.exe. Review URL: http://codereview.chromium.org/146074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@19482 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r--chrome/browser/spellcheck_unittest.cc5
-rw-r--r--chrome/browser/spellcheck_worditerator.cc2
2 files changed, 6 insertions, 1 deletions
diff --git a/chrome/browser/spellcheck_unittest.cc b/chrome/browser/spellcheck_unittest.cc
index 47b608f..d3c3388 100644
--- a/chrome/browser/spellcheck_unittest.cc
+++ b/chrome/browser/spellcheck_unittest.cc
@@ -259,6 +259,11 @@ TEST_F(SpellCheckTest, SpellCheckStrings_EN_US) {
// [ROBUSTNESS] Two invalid English words concatenated with a contraction
// character.
{L"ifmmp:ifmmp", false, 0, 11},
+
+ // [REGRESSION] Issue 13432: "Any word of 13 or 14 characters is not
+ // spellcheck" <http://crbug.com/13432>.
+ {L"qwertyuiopasd", false, 0, 13},
+ {L"qwertyuiopasdf", false, 0, 14},
};
FilePath hunspell_directory = GetHunspellDirectory();
diff --git a/chrome/browser/spellcheck_worditerator.cc b/chrome/browser/spellcheck_worditerator.cc
index 1b98b4a..2cbb6af 100644
--- a/chrome/browser/spellcheck_worditerator.cc
+++ b/chrome/browser/spellcheck_worditerator.cc
@@ -271,5 +271,5 @@ bool SpellcheckWordIterator::Normalize(int input_start,
Normalizer::normalize(input, UNORM_NFKC, 0, output, status);
if (U_SUCCESS(status))
output_string->assign(output.getTerminatedBuffer());
- return (status == U_ZERO_ERROR);
+ return status == U_ZERO_ERROR || status == U_STRING_NOT_TERMINATED_WARNING;
}