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

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

Issue 342853004: sync: Refactor TwoClientPreferencesSyncTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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/sync_test.cc
diff --git a/chrome/browser/sync/test/integration/sync_test.cc b/chrome/browser/sync/test/integration/sync_test.cc
index 358c72cac856d5630827fba5dfa1ffd0b416bac8..22b0a8c9fc400c3bb42f4cc2eae423162ab21dbc 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -835,17 +835,20 @@ bool SyncTest::EnableEncryption(int index) {
bool sync_everything = synced_datatypes.Equals(syncer::ModelTypeSet::All());
service->OnUserChoseDatatypes(sync_everything, synced_datatypes);
- // Wait some time to let the enryption finish.
- EncryptionChecker checker(service);
- checker.Wait();
-
- return !checker.TimedOut();
+ return AwaitEncryptionComplete(index);
}
bool SyncTest::IsEncryptionComplete(int index) {
return ::IsEncryptionComplete(GetClient(index)->service());
}
+bool SyncTest::AwaitEncryptionComplete(int index) {
+ ProfileSyncService* service = GetClient(index)->service();
+ EncryptionChecker checker(service);
+ checker.Wait();
+ return !checker.TimedOut();
+}
+
bool SyncTest::AwaitQuiescence() {
return ProfileSyncServiceHarness::AwaitQuiescence(clients());
}

Powered by Google App Engine
This is Rietveld 408576698