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

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

Issue 1851243002: [Sync] Eliminate verifier profile from sync_integration_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: do not remove AwaitQuiescence() Created 4 years, 8 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 402 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 } 413 }
414 414
415 Profile* SyncTest::GetProfile(int index) { 415 Profile* SyncTest::GetProfile(int index) {
416 if (profiles_.empty()) 416 if (profiles_.empty())
417 LOG(FATAL) << "SetupClients() has not yet been called."; 417 LOG(FATAL) << "SetupClients() has not yet been called.";
418 if (index < 0 || index >= static_cast<int>(profiles_.size())) 418 if (index < 0 || index >= static_cast<int>(profiles_.size()))
419 LOG(FATAL) << "GetProfile(): Index is out of bounds."; 419 LOG(FATAL) << "GetProfile(): Index is out of bounds.";
420 return profiles_[index]; 420 return profiles_[index];
421 } 421 }
422 422
423 std::vector<Profile*> SyncTest::GetAllProfiles() {
424 std::vector<Profile*> profiles;
425 if (use_verifier()) {
426 profiles.push_back(verifier());
427 }
428 for (int i = 0; i < num_clients(); ++i) {
429 profiles.push_back(GetProfile(i));
430 }
431 return profiles;
432 }
433
423 Browser* SyncTest::GetBrowser(int index) { 434 Browser* SyncTest::GetBrowser(int index) {
424 if (browsers_.empty()) 435 if (browsers_.empty())
425 LOG(FATAL) << "SetupClients() has not yet been called."; 436 LOG(FATAL) << "SetupClients() has not yet been called.";
426 if (index < 0 || index >= static_cast<int>(browsers_.size())) 437 if (index < 0 || index >= static_cast<int>(browsers_.size()))
427 LOG(FATAL) << "GetBrowser(): Index is out of bounds."; 438 LOG(FATAL) << "GetBrowser(): Index is out of bounds.";
428 return browsers_[index]; 439 return browsers_[index];
429 } 440 }
430 441
431 ProfileSyncServiceHarness* SyncTest::GetClient(int index) { 442 ProfileSyncServiceHarness* SyncTest::GetClient(int index) {
432 if (clients_.empty()) 443 if (clients_.empty())
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 1128
1118 void SyncTest::TriggerSyncForModelTypes(int index, 1129 void SyncTest::TriggerSyncForModelTypes(int index,
1119 syncer::ModelTypeSet model_types) { 1130 syncer::ModelTypeSet model_types) {
1120 GetSyncService(index)->TriggerRefresh(model_types); 1131 GetSyncService(index)->TriggerRefresh(model_types);
1121 } 1132 }
1122 1133
1123 void SyncTest::SetPreexistingPreferencesFileContents( 1134 void SyncTest::SetPreexistingPreferencesFileContents(
1124 const std::string& contents) { 1135 const std::string& contents) {
1125 preexisting_preferences_file_contents_ = contents; 1136 preexisting_preferences_file_contents_ = contents;
1126 } 1137 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698