Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1277)

Unified Diff: chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc

Issue 11434043: Remove duplicate words from custom spelling dictionary on load (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix unit test Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
diff --git a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
index bdbc15ea52f963249653d8dab66c3ae504b859f2..1073440e3fa73bf8c75ab05ce0d1493e56f66ebd 100644
--- a/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
+++ b/chrome/browser/spellchecker/spellcheck_custom_dictionary_unittest.cc
@@ -102,6 +102,7 @@ TEST_F(SpellcheckCustomDictionaryTest, SaveAndLoad) {
// The custom word list should include written words.
custom_dictionary->LoadDictionaryIntoCustomWordList(&loaded_custom_words);
+ std::sort(expected.begin(), expected.end());
EXPECT_EQ(loaded_custom_words, expected);
// Load in another instance of SpellCheckService.
@@ -151,10 +152,12 @@ TEST_F(SpellcheckCustomDictionaryTest, MultiProfile) {
WordList actual1;
custom_dictionary->LoadDictionaryIntoCustomWordList(&actual1);
+ std::sort(expected1.begin(), expected1.end());
EXPECT_EQ(actual1, expected1);
WordList actual2;
custom_dictionary2->LoadDictionaryIntoCustomWordList(&actual2);
+ std::sort(expected2.begin(), expected2.end());
EXPECT_EQ(actual2, expected2);
// Flush the loop now to prevent service init tasks from being run during

Powered by Google App Engine
This is Rietveld 408576698