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

Side by Side Diff: chrome/browser/sync/test/integration/status_change_checker.h

Issue 184993006: sync: Change progress marker checking in tests (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review fixes Created 6 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_STATUS_CHANGE_CHECKER_H_ 5 #ifndef CHROME_BROWSER_SYNC_TEST_INTEGRATION_STATUS_CHANGE_CHECKER_H_
6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_STATUS_CHANGE_CHECKER_H_ 6 #define CHROME_BROWSER_SYNC_TEST_INTEGRATION_STATUS_CHANGE_CHECKER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 class ProfileSyncServiceObserver; 10 class ProfileSyncServiceHarness;
11 11
12 // Interface for a helper class that can be used to check if a desired change in 12 // Interface for a helper class that can be used to check if a desired change in
13 // the state of the sync engine has taken place. Used by the desktop sync 13 // the state of the sync engine has taken place. Used by the desktop sync
14 // integration tests. 14 // integration tests.
15 // 15 //
16 // Usage: Tests that want to use this class to wait for an arbitrary sync state 16 // Usage: Tests that want to use this class to wait for an arbitrary sync state
17 // must implement a concrete StatusChangeChecker object and pass it to 17 // must implement a concrete StatusChangeChecker object and pass it to
18 // ProfileSyncServiceHarness::AwaitStatusChange(). 18 // ProfileSyncServiceHarness::AwaitStatusChange().
19 class StatusChangeChecker { 19 class StatusChangeChecker {
20 public: 20 public:
21 explicit StatusChangeChecker(); 21 explicit StatusChangeChecker();
22 22
23 // Called every time ProfileSyncServiceHarness is notified of a change in the 23 // Called every time ProfileSyncServiceHarness is notified of a change in the
24 // state of the sync engine. Returns true if the desired change has occurred. 24 // state of the sync engine. Returns true if the desired change has occurred.
25 virtual bool IsExitConditionSatisfied() = 0; 25 virtual bool IsExitConditionSatisfied() = 0;
26 26
27 // Returns a string representing this current StatusChangeChecker, and 27 // Returns a string representing this current StatusChangeChecker, and
28 // possibly some small part of its state. For example: "AwaitPassphraseError" 28 // possibly some small part of its state. For example: "AwaitPassphraseError"
29 // or "AwaitMigrationDone(BOOKMARKS)". 29 // or "AwaitMigrationDone(BOOKMARKS)".
30 virtual std::string GetDebugMessage() const = 0; 30 virtual std::string GetDebugMessage() const = 0;
31 31
32 virtual void InitObserver(ProfileSyncServiceObserver*) = 0; 32 virtual void InitObserver(ProfileSyncServiceHarness*) = 0;
33 virtual void UninitObserver(ProfileSyncServiceObserver*) = 0; 33 virtual void UninitObserver(ProfileSyncServiceHarness*) = 0;
34 34
35 protected: 35 protected:
36 virtual ~StatusChangeChecker(); 36 virtual ~StatusChangeChecker();
37 }; 37 };
38 38
39 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_STATUS_CHANGE_CHECKER_H_ 39 #endif // CHROME_BROWSER_SYNC_TEST_INTEGRATION_STATUS_CHANGE_CHECKER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698