diff options
author | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 20:32:47 +0000 |
---|---|---|
committer | rouslan@chromium.org <rouslan@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-20 20:32:47 +0000 |
commit | a887abfbb9004add60704e8a7148ccd5d89d9e60 (patch) | |
tree | 2efd6020796bd8d07110c698886276200945677e /chrome/browser/spellchecker/spellcheck_custom_dictionary.cc | |
parent | 8c197e505cd05525768826f46aa1d0e0d6058435 (diff) | |
download | chromium_src-a887abfbb9004add60704e8a7148ccd5d89d9e60.zip chromium_src-a887abfbb9004add60704e8a7148ccd5d89d9e60.tar.gz chromium_src-a887abfbb9004add60704e8a7148ccd5d89d9e60.tar.bz2 |
Unit-tests for removing words from the dictionary
BUG=161361
Review URL: https://chromiumcodereview.appspot.com/11280013
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@168863 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/spellchecker/spellcheck_custom_dictionary.cc')
-rw-r--r-- | chrome/browser/spellchecker/spellcheck_custom_dictionary.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc index 1d8ce84..b793b27 100644 --- a/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc +++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary.cc @@ -49,8 +49,10 @@ void SpellcheckCustomDictionary::LoadDictionaryIntoCustomWordList( std::string contents; file_util::ReadFileToString(custom_dictionary_path_, &contents); - if (contents.empty()) + if (contents.empty()) { + custom_words->clear(); return; + } base::SplitString(contents, '\n', custom_words); // Clear out empty words. |