Index: chrome/browser/sync/test/integration/passwords_helper.h |
diff --git a/chrome/browser/sync/test/integration/passwords_helper.h b/chrome/browser/sync/test/integration/passwords_helper.h |
index dc76fa846a1fc9f3d9168224972878382a69e85e..b1d1ec15401ecb190957becd8d92d51813276ef2 100644 |
--- a/chrome/browser/sync/test/integration/passwords_helper.h |
+++ b/chrome/browser/sync/test/integration/passwords_helper.h |
@@ -6,10 +6,13 @@ |
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_PASSWORDS_HELPER_H_ |
#include <memory> |
+#include <string> |
#include <vector> |
#include "base/memory/scoped_vector.h" |
#include "chrome/browser/profiles/profile.h" |
+#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h" |
+#include "chrome/browser/sync/test/integration/single_client_status_change_checker.h" |
#include "chrome/browser/sync/test/integration/sync_test.h" |
#include "components/autofill/core/common/password_form.h" |
#include "components/browser_sync/profile_sync_service.h" |
@@ -65,12 +68,6 @@ bool AllProfilesContainSamePasswordFormsAsVerifier(); |
// Returns true iff all profiles contain the same password forms. |
bool AllProfilesContainSamePasswordForms(); |
-// Returns true if all profiles contain the same password forms and |
-// it doesn't time out. |
-bool AwaitAllProfilesContainSamePasswordForms(); |
- |
-// Returns true if specified profile contains the same password forms as the |
-// verifier and it doesn't time out. |
bool AwaitProfileContainsSamePasswordFormsAsVerifier(int index); |
// Returns the number of forms in the password store of the profile with index |
@@ -86,4 +83,35 @@ autofill::PasswordForm CreateTestPasswordForm(int index); |
} // namespace passwords_helper |
+// Checker to block until all profiles contain the same password forms. |
+class SamePasswordFormsChecker : public MultiClientStatusChangeChecker { |
+ public: |
+ SamePasswordFormsChecker(); |
+ |
+ // StatusChangeChecker implementation. |
+ bool IsExitConditionSatisfied() override; |
+ std::string GetDebugMessage() const override; |
+ |
+ private: |
+ bool in_progress_; |
+ bool needs_recheck_; |
+}; |
+ |
+// Checker to block until specified profile contains the same password forms as |
+// the verifier. |
+class SamePasswordFormsAsVerifierChecker |
+ : public SingleClientStatusChangeChecker { |
+ public: |
+ explicit SamePasswordFormsAsVerifierChecker(int index); |
+ |
+ // StatusChangeChecker implementation. |
+ bool IsExitConditionSatisfied() override; |
+ std::string GetDebugMessage() const override; |
+ |
+ private: |
+ int index_; |
+ bool in_progress_; |
+ bool needs_recheck_; |
+}; |
+ |
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_PASSWORDS_HELPER_H_ |