| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ | 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ |
| 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ | 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ |
| 7 | 7 |
| 8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
| 9 #include "base/values.h" | 9 #include "base/values.h" |
| 10 | 10 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 40 // |verifier| if DisableVerifier() hasn't been called. | 40 // |verifier| if DisableVerifier() hasn't been called. |
| 41 void ChangeDoublePref(int index, const char* pref_name, double new_value); | 41 void ChangeDoublePref(int index, const char* pref_name, double new_value); |
| 42 | 42 |
| 43 // Changes the value of the string preference with name |pref_name| in the | 43 // Changes the value of the string preference with name |pref_name| in the |
| 44 // profile with index |index| to |new_value|. Also changes its value in | 44 // profile with index |index| to |new_value|. Also changes its value in |
| 45 // |verifier| if DisableVerifier() hasn't been called. | 45 // |verifier| if DisableVerifier() hasn't been called. |
| 46 void ChangeStringPref(int index, | 46 void ChangeStringPref(int index, |
| 47 const char* pref_name, | 47 const char* pref_name, |
| 48 const std::string& new_value); | 48 const std::string& new_value); |
| 49 | 49 |
| 50 // Modifies the value of the string preference with name |pref_name| in the | |
| 51 // profile with index |index| by appending |append_value| to its current | |
| 52 // value. Also changes its value in |verifier| if DisableVerifier() hasn't | |
| 53 // been called. | |
| 54 void AppendStringPref(int index, | |
| 55 const char* pref_name, | |
| 56 const std::string& append_value); | |
| 57 | |
| 58 // Changes the value of the file path preference with name |pref_name| in the | 50 // Changes the value of the file path preference with name |pref_name| in the |
| 59 // profile with index |index| to |new_value|. Also changes its value in | 51 // profile with index |index| to |new_value|. Also changes its value in |
| 60 // |verifier| if DisableVerifier() hasn't been called. | 52 // |verifier| if DisableVerifier() hasn't been called. |
| 61 void ChangeFilePathPref(int index, | 53 void ChangeFilePathPref(int index, |
| 62 const char* pref_name, | 54 const char* pref_name, |
| 63 const base::FilePath& new_value); | 55 const base::FilePath& new_value); |
| 64 | 56 |
| 65 // Changes the value of the list preference with name |pref_name| in the | 57 // Changes the value of the list preference with name |pref_name| in the |
| 66 // profile with index |index| to |new_value|. Also changes its value in | 58 // profile with index |index| to |new_value|. Also changes its value in |
| 67 // |verifier| if DisableVerifier() hasn't been called. | 59 // |verifier| if DisableVerifier() hasn't been called. |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 | 93 |
| 102 // Used to verify that the list preference with name |pref_name| has the | 94 // Used to verify that the list preference with name |pref_name| has the |
| 103 // same value across all profiles. Also checks |verifier| if DisableVerifier() | 95 // same value across all profiles. Also checks |verifier| if DisableVerifier() |
| 104 // hasn't been called. | 96 // hasn't been called. |
| 105 bool ListPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; | 97 bool ListPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; |
| 106 | 98 |
| 107 // This is the version of ListPrefMatches that waits for the preference list | 99 // This is the version of ListPrefMatches that waits for the preference list |
| 108 // to match in all profiles. Returns false if this operation times out. | 100 // to match in all profiles. Returns false if this operation times out. |
| 109 bool AwaitListPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; | 101 bool AwaitListPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; |
| 110 | 102 |
| 103 // Blocks the test until the specified pref matches on all relevant clients or |
| 104 // a timeout occurs. Returns false if it returns because of a timeout. |
| 105 bool AwaitBooleanPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; |
| 106 |
| 107 // Blocks the test until the specified pref matches on all relevant clients or |
| 108 // a timeout occurs. Returns false if it returns because of a timeout. |
| 109 bool AwaitIntegerPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; |
| 110 |
| 111 // Blocks the test until the specified pref matches on all relevant clients or |
| 112 // a timeout occurs. Returns false if it returns because of a timeout. |
| 113 bool AwaitStringPrefMatches(const char* pref_name) WARN_UNUSED_RESULT; |
| 114 |
| 111 } // namespace preferences_helper | 115 } // namespace preferences_helper |
| 112 | 116 |
| 113 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ | 117 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PREFERENCES_HELPER_H_ |
| OLD | NEW |