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

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: Updates for Max. 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 998 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1009
1010 return AwaitEncryptionComplete(index); 1010 return AwaitEncryptionComplete(index);
1011 } 1011 }
1012 1012
1013 bool SyncTest::IsEncryptionComplete(int index) { 1013 bool SyncTest::IsEncryptionComplete(int index) {
1014 return ::IsEncryptionComplete(GetClient(index)->service()); 1014 return ::IsEncryptionComplete(GetClient(index)->service());
1015 } 1015 }
1016 1016
1017 bool SyncTest::AwaitEncryptionComplete(int index) { 1017 bool SyncTest::AwaitEncryptionComplete(int index) {
1018 ProfileSyncService* service = GetClient(index)->service(); 1018 ProfileSyncService* service = GetClient(index)->service();
1019 EncryptionChecker checker(service); 1019 return EncryptionChecker(service).Wait();
1020 checker.Wait();
1021 return !checker.TimedOut();
1022 } 1020 }
1023 1021
1024 bool SyncTest::AwaitQuiescence() { 1022 bool SyncTest::AwaitQuiescence() {
1025 return ProfileSyncServiceHarness::AwaitQuiescence(clients()); 1023 return ProfileSyncServiceHarness::AwaitQuiescence(clients());
1026 } 1024 }
1027 1025
1028 bool SyncTest::UsingExternalServers() { 1026 bool SyncTest::UsingExternalServers() {
1029 return server_type_ == EXTERNAL_LIVE_SERVER; 1027 return server_type_ == EXTERNAL_LIVE_SERVER;
1030 } 1028 }
1031 1029
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
1132 1130
1133 void SyncTest::TriggerSyncForModelTypes(int index, 1131 void SyncTest::TriggerSyncForModelTypes(int index,
1134 syncer::ModelTypeSet model_types) { 1132 syncer::ModelTypeSet model_types) {
1135 GetSyncService(index)->TriggerRefresh(model_types); 1133 GetSyncService(index)->TriggerRefresh(model_types);
1136 } 1134 }
1137 1135
1138 void SyncTest::SetPreexistingPreferencesFileContents( 1136 void SyncTest::SetPreexistingPreferencesFileContents(
1139 const std::string& contents) { 1137 const std::string& contents) {
1140 preexisting_preferences_file_contents_ = contents; 1138 preexisting_preferences_file_contents_ = contents;
1141 } 1139 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698