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

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

Issue 315823002: sync: Refactor TwoClientPreferencesSyncTest (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Formatting fix + explicit constructors 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 12b80fe94c1707ed45d9f12ec730e63bbcb4cac7..4b1639f33975b77fed3ab276a6dbb50268498cf2 100644
--- a/chrome/browser/sync/test/integration/sync_test.cc
+++ b/chrome/browser/sync/test/integration/sync_test.cc
@@ -818,17 +818,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