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

Unified Diff: chrome/browser/sync/test/integration/search_engines_helper.cc

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/search_engines_helper.cc
diff --git a/chrome/browser/sync/test/integration/search_engines_helper.cc b/chrome/browser/sync/test/integration/search_engines_helper.cc
index 1061133a2b092b761fe6d4958e3303643057e98a..c84cf5383d0d47391e52d0cc8bddc0517c0ba8b7 100644
--- a/chrome/browser/sync/test/integration/search_engines_helper.cc
+++ b/chrome/browser/sync/test/integration/search_engines_helper.cc
@@ -15,7 +15,6 @@
#include "base/time/time.h"
#include "chrome/browser/profiles/profile.h"
#include "chrome/browser/search_engines/template_url_service_factory.h"
-#include "chrome/browser/sync/test/integration/await_match_status_change_checker.h"
#include "chrome/browser/sync/test/integration/profile_sync_service_harness.h"
#include "chrome/browser/sync/test/integration/sync_datatype_helper.h"
#include "chrome/browser/sync/test/integration/sync_test.h"
@@ -163,13 +162,6 @@ bool ServiceMatchesVerifier(int profile_index) {
return true;
}
-bool AwaitAllServicesMatch() {
- AwaitMatchStatusChangeChecker checker(base::Bind(AllServicesMatch),
- "All search engines match");
- checker.Wait();
- return !checker.TimedOut();
-}
-
bool AllServicesMatch() {
// Use 0 as the baseline.
if (test()->use_verifier() && !ServiceMatchesVerifier(0)) {
@@ -286,3 +278,8 @@ bool HasSearchEngine(int profile_index, int seed) {
}
} // namespace search_engines_helper
+
+SearchEnginesMatchChecker::SearchEnginesMatchChecker()
+ : AwaitMatchStatusChangeChecker(
+ base::Bind(search_engines_helper::AllServicesMatch),
+ "All search engines match") {}
« no previous file with comments | « chrome/browser/sync/test/integration/search_engines_helper.h ('k') | chrome/browser/sync/test/integration/sessions_helper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698