#include "chrome/browser/sync/test/integration/dictionary_helper.h"
#include <set>
#include "base/format_macros.h"
#include "base/run_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/spellchecker/spellcheck_custom_dictionary.h"
#include "chrome/browser/spellchecker/spellcheck_factory.h"
#include "chrome/browser/spellchecker/spellcheck_service.h"
#include "chrome/browser/sync/test/integration/dictionary_load_observer.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
#include "content/public/test/test_utils.h"
#include "testing/gtest/include/gtest/gtest.h"
class DictionarySyncIntegrationTestHelper { … };
namespace dictionary_helper {
namespace {
SpellcheckCustomDictionary* GetDictionary(int index) { … }
void LoadDictionary(SpellcheckCustomDictionary* dictionary) { … }
}
const std::set<std::string>& GetDictionaryWords(int profile_index) { … }
void LoadDictionaries() { … }
size_t GetDictionarySize(int index) { … }
bool AddWord(int index, const std::string& word) { … }
bool AddWords(int index, int n, const std::string& prefix) { … }
bool RemoveWord(int index, const std::string& word) { … }
DictionaryChecker::DictionaryChecker(
const std::vector<std::string>& expected_words)
: … { … }
DictionaryChecker::~DictionaryChecker() = default;
bool DictionaryChecker::IsExitConditionSatisfied(std::ostream* os) { … }
NumDictionaryEntriesChecker::NumDictionaryEntriesChecker(int index,
size_t num_words)
: … { … }
bool NumDictionaryEntriesChecker::IsExitConditionSatisfied(std::ostream* os) { … }
}