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

Unified Diff: chrome/browser/sync/profile_sync_service_harness.h

Issue 7753023: [Sync] Add tests for migration triggered by notifications (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments Created 9 years, 4 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
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/sync/profile_sync_service_harness.h
diff --git a/chrome/browser/sync/profile_sync_service_harness.h b/chrome/browser/sync/profile_sync_service_harness.h
index 8a00cc6d78c9dd941a9fe7af65dbad6d6c7a639f..5ec8a444deb00c7ee0e4e9d85378ca9423dc605f 100644
--- a/chrome/browser/sync/profile_sync_service_harness.h
+++ b/chrome/browser/sync/profile_sync_service_harness.h
@@ -32,8 +32,7 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
public:
ProfileSyncServiceHarness(Profile* profile,
const std::string& username,
- const std::string& password,
- bool expected_notifications_enabled);
+ const std::string& password);
virtual ~ProfileSyncServiceHarness();
@@ -74,6 +73,15 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
// since the previous one. Returns true if a sync cycle has completed.
bool AwaitSyncCycleCompletion(const std::string& reason);
+ // Blocks the caller until this harness has completed a single sync
+ // cycle, even if we're already synced. Returns true if a sync
+ // cycle has completed.
+ //
+ // TODO(akalin): This is only used by some migration tests, pending
+ // the fix for http://crbug.com/92928. Remove this once that is
+ // fixed.
+ bool AwaitNextSyncCycleCompletion(const std::string& reason);
+
// Blocks the caller until the sync has been disabled for this client. Returns
// true if sync is disabled.
bool AwaitSyncDisabled(const std::string& reason);
@@ -238,6 +246,10 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
bool AwaitStatusChangeWithTimeout(int timeout_milliseconds,
const std::string& reason);
+ // Used by AwaitSyncCycleCompletion() and
+ // AwaitNextSyncCycleCompletion().
+ bool AwaitSyncCycleCompletionHelper(const std::string& reason);
+
// Returns true if the sync client has no unsynced items.
bool IsSynced();
@@ -278,9 +290,6 @@ class ProfileSyncServiceHarness : public ProfileSyncServiceObserver {
std::string username_;
std::string password_;
- // The expected value of GetStatus().notifications_enabled.
- bool expected_notifications_enabled_;
-
// Used for logging.
const std::string profile_debug_name_;
« no previous file with comments | « chrome/browser/sync/notifier/p2p_notifier.cc ('k') | chrome/browser/sync/profile_sync_service_harness.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698