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

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

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Fixing another ChromeOS test. Created 4 years, 3 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/status_change_checker.h
diff --git a/chrome/browser/sync/test/integration/status_change_checker.h b/chrome/browser/sync/test/integration/status_change_checker.h
index b1611cc86b39881da881f2b63ecfe66235879ded..9d62bb091b3dda49df5153b037ceddd7f0ecdd5b 100644
--- a/chrome/browser/sync/test/integration/status_change_checker.h
+++ b/chrome/browser/sync/test/integration/status_change_checker.h
@@ -21,18 +21,25 @@ class ProfileSyncServiceHarness;
// sense to call StartBlockingWait() more than once.
class StatusChangeChecker {
public:
- explicit StatusChangeChecker();
+ StatusChangeChecker();
// Returns a string representing this current StatusChangeChecker, and
// possibly some small part of its state. For example: "AwaitPassphraseError"
// or "AwaitMigrationDone(BOOKMARKS)".
virtual std::string GetDebugMessage() const = 0;
+ // Returns a bool representing if the state the checker is currently in its
maxbogue 2016/09/30 16:27:56 "Returns whether the state the checker is currentl
skym 2016/09/30 17:43:21 Right? I was trying really hard to not just repeat
+ // desired configuration.
+ virtual bool IsExitConditionSatisfied() = 0;
+
+ // Block if IsExitConditionSatisfied() is currently false until TimeOut()
maxbogue 2016/09/30 16:27:56 "TimedOut()" Also this makes it sound like you ch
skym 2016/09/30 17:43:22 Done.
+ // becomes true. Checkers should call CheckExitCondition upon changes. Returns
+ // true if IsExitConditionSatisfied() is ultimately true, otherwise false.
+ bool Wait();
+
// Returns true if the blocking wait was exited because of a timeout.
bool TimedOut() const;
- virtual bool IsExitConditionSatisfied() = 0;
-
protected:
virtual ~StatusChangeChecker();

Powered by Google App Engine
This is Rietveld 408576698