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

Side by Side Diff: chrome/browser/sync/test/integration/sync_test.cc

Issue 2379433002: [Sync] Refactoring of sync integration test checkers to remove boilerplate await methods. (Closed)
Patch Set: Rebase Created 4 years, 2 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "chrome/browser/sync/test/integration/sync_test.h" 5 #include "chrome/browser/sync/test/integration/sync_test.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include <limits> 10 #include <limits>
(...skipping 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 1006
1007 return AwaitEncryptionComplete(index); 1007 return AwaitEncryptionComplete(index);
1008 } 1008 }
1009 1009
1010 bool SyncTest::IsEncryptionComplete(int index) { 1010 bool SyncTest::IsEncryptionComplete(int index) {
1011 return ::IsEncryptionComplete(GetClient(index)->service()); 1011 return ::IsEncryptionComplete(GetClient(index)->service());
1012 } 1012 }
1013 1013
1014 bool SyncTest::AwaitEncryptionComplete(int index) { 1014 bool SyncTest::AwaitEncryptionComplete(int index) {
1015 ProfileSyncService* service = GetClient(index)->service(); 1015 ProfileSyncService* service = GetClient(index)->service();
1016 EncryptionChecker checker(service); 1016 return EncryptionChecker(service).Wait();
1017 checker.Wait();
1018 return !checker.TimedOut();
1019 } 1017 }
1020 1018
1021 bool SyncTest::AwaitQuiescence() { 1019 bool SyncTest::AwaitQuiescence() {
1022 return ProfileSyncServiceHarness::AwaitQuiescence(clients()); 1020 return ProfileSyncServiceHarness::AwaitQuiescence(clients());
1023 } 1021 }
1024 1022
1025 bool SyncTest::UsingExternalServers() { 1023 bool SyncTest::UsingExternalServers() {
1026 return server_type_ == EXTERNAL_LIVE_SERVER; 1024 return server_type_ == EXTERNAL_LIVE_SERVER;
1027 } 1025 }
1028 1026
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 1127
1130 void SyncTest::TriggerSyncForModelTypes(int index, 1128 void SyncTest::TriggerSyncForModelTypes(int index,
1131 syncer::ModelTypeSet model_types) { 1129 syncer::ModelTypeSet model_types) {
1132 GetSyncService(index)->TriggerRefresh(model_types); 1130 GetSyncService(index)->TriggerRefresh(model_types);
1133 } 1131 }
1134 1132
1135 void SyncTest::SetPreexistingPreferencesFileContents( 1133 void SyncTest::SetPreexistingPreferencesFileContents(
1136 const std::string& contents) { 1134 const std::string& contents) {
1137 preexisting_preferences_file_contents_ = contents; 1135 preexisting_preferences_file_contents_ = contents;
1138 } 1136 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698