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

Unified Diff: chrome/browser/sync/test/integration/typed_urls_helper.h

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Rebase Created 4 years, 2 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/typed_urls_helper.h
diff --git a/chrome/browser/sync/test/integration/typed_urls_helper.h b/chrome/browser/sync/test/integration/typed_urls_helper.h
index b7a39bfcff2846aa1de1d683cb34fde6a3b4f468..2792559261f45d57202e26353c6aa698e4b9b2c2 100644
--- a/chrome/browser/sync/test/integration/typed_urls_helper.h
+++ b/chrome/browser/sync/test/integration/typed_urls_helper.h
@@ -5,8 +5,10 @@
#ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_TYPED_URLS_HELPER_H_
#define CHROME_BROWSER_SYNC_TEST_INTEGRATION_TYPED_URLS_HELPER_H_
+#include <string>
#include <vector>
+#include "chrome/browser/sync/test/integration/multi_client_status_change_checker.h"
#include "components/history/core/browser/history_types.h"
#include "ui/base/page_transition_types.h"
@@ -67,9 +69,6 @@ void SetPageTitle(int index, const GURL& url, const std::string& title);
// Returns true if all clients have the same URLs.
bool CheckAllProfilesHaveSameURLs();
-// Returns true if all clients have the same URLs before the timeout.
-bool AwaitCheckAllProfilesHaveSameURLs();
-
// Checks that the two vectors contain the same set of URLRows (possibly in
// a different order).
bool CheckURLRowVectorsAreEqual(const history::URLRows& left,
@@ -95,4 +94,14 @@ base::Time GetTimestamp();
} // namespace typed_urls_helper
+// Checker that blocks until all clients have the same URLs.
+class ProfilesHaveSameURLsChecker : public MultiClientStatusChangeChecker {
+ public:
+ ProfilesHaveSameURLsChecker();
+
+ // Implementation of StatusChangeChecker.
+ bool IsExitConditionSatisfied() override;
+ std::string GetDebugMessage() const override;
+};
+
#endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_TYPED_URLS_HELPER_H_

Powered by Google App Engine
This is Rietveld 408576698