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

Unified Diff: chrome/browser/sync/test/integration/dictionary_helper.cc

Issue 15940004: Add HasWord(string) method to SpellcheckCustomDictionary (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Attempt to fix android compile again Created 7 years, 7 months 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/sync/test/integration/dictionary_helper.cc
diff --git a/chrome/browser/sync/test/integration/dictionary_helper.cc b/chrome/browser/sync/test/integration/dictionary_helper.cc
index 5ec83d56ab3c95d253a99b1ec66d3452d321c991..9e5bc97bad0252af77c4d42070d4054273af1842 100644
--- a/chrome/browser/sync/test/integration/dictionary_helper.cc
+++ b/chrome/browser/sync/test/integration/dictionary_helper.cc
@@ -22,7 +22,6 @@ class DictionarySyncIntegrationTestHelper {
static bool ApplyChange(
SpellcheckCustomDictionary* dictionary,
SpellcheckCustomDictionary::Change& change) {
- std::sort(dictionary->words_.begin(), dictionary->words_.end());
int result = change.Sanitize(dictionary->GetWords());
dictionary->Apply(change);
dictionary->Notify(change);
@@ -106,14 +105,14 @@ size_t GetVerifierDictionarySize() {
}
bool DictionariesMatch() {
- chrome::spellcheck_common::WordList reference =
+ chrome::spellcheck_common::WordSet reference =
sync_datatype_helper::test()->use_verifier() ?
GetVerifierDictionary()->GetWords() : GetDictionary(0)->GetWords();
for (int i = 0; i < sync_datatype_helper::test()->num_clients(); ++i) {
if (reference.size() != GetDictionary(i)->GetWords().size())
return false;
}
- for (chrome::spellcheck_common::WordList::iterator it = reference.begin();
+ for (chrome::spellcheck_common::WordSet::iterator it = reference.begin();
it != reference.end();
++it) {
if (!HaveWordMatches(*it))
@@ -123,12 +122,12 @@ bool DictionariesMatch() {
}
bool DictionaryMatchesVerifier(int index) {
- chrome::spellcheck_common::WordList expected =
+ chrome::spellcheck_common::WordSet expected =
GetVerifierDictionary()->GetWords();
- chrome::spellcheck_common::WordList actual = GetDictionary(index)->GetWords();
+ chrome::spellcheck_common::WordSet actual = GetDictionary(index)->GetWords();
if (expected.size() != actual.size())
return false;
- for (chrome::spellcheck_common::WordList::iterator it = expected.begin();
+ for (chrome::spellcheck_common::WordSet::iterator it = expected.begin();
it != expected.end();
++it) {
if (actual.end() == std::find(actual.begin(), actual.end(), *it))

Powered by Google App Engine
This is Rietveld 408576698