BookmarkManager: Fix 'new folder text field size changes on clicking it' issue.
[chromium-blink-merge.git] / chrome / browser / sync / test / integration / dictionary_helper.h
blob52d0a0d1918179cf7c7483496df529ad16d863ee
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_
8 #include <string>
10 namespace dictionary_helper {
12 // Synchronously loads the dictionaries across all profiles. Also loads the
13 // dictionary for the verifier if DisableVerifier() hasn't been called. Returns
14 // only after the dictionaries have finished to load.
15 void LoadDictionaries();
17 // Used to check the size of the dictionary within a particular sync profile.
18 size_t GetDictionarySize(int index);
20 // Used to check the size of the dictionary within the verifier sync profile.
21 size_t GetVerifierDictionarySize();
23 // Used to verify that dictionaries match across all profiles. Also checks
24 // verifier if DisableVerifier() hasn't been called.
25 bool DictionariesMatch();
27 // Waits until dictionaries match across all platforms. Returns false
28 // if this operation times out.
29 bool AwaitDictionariesMatch();
31 // Waits until the profile at the given index contains exactly |num| dictionary
32 // entries. Returns false if this operation times out.
33 bool AwaitNumDictionaryEntries(int index, size_t num_words);
35 // Used to verify that the dictionary within a particular sync profile matches
36 // the dictionary within the verifier sync profile.
37 bool DictionaryMatchesVerifier(int index);
39 // Adds |word| to the dictionary for profile with index |index|. Also adds
40 // |word| to the verifier if DisableVerifier() hasn't been called. Returns true
41 // if |word| is valid and not a duplicate. Otherwise returns false.
42 bool AddWord(int index, const std::string& word);
44 // Removes |word| from the dictionary for profile with index |index|. Also
45 // removes |word| from the verifier if DisableVerifier() hasn't been called.
46 // Returns true if |word| was found. Otherwise returns false.
47 bool RemoveWord(int index, const std::string& word);
49 } // namespace dictionary_helper
51 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_DICTIONARY_HELPER_H_