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

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

Issue 1850253002: Revert of [Sync] Eliminate verifier profile from sync_integration_tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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
434 Browser* SyncTest::GetBrowser(int index) { 423 Browser* SyncTest::GetBrowser(int index) {
435 if (browsers_.empty()) 424 if (browsers_.empty())
436 LOG(FATAL) << "SetupClients() has not yet been called."; 425 LOG(FATAL) << "SetupClients() has not yet been called.";
437 if (index < 0 || index >= static_cast<int>(browsers_.size())) 426 if (index < 0 || index >= static_cast<int>(browsers_.size()))
438 LOG(FATAL) << "GetBrowser(): Index is out of bounds."; 427 LOG(FATAL) << "GetBrowser(): Index is out of bounds.";
439 return browsers_[index]; 428 return browsers_[index];
440 } 429 }
441 430
442 ProfileSyncServiceHarness* SyncTest::GetClient(int index) { 431 ProfileSyncServiceHarness* SyncTest::GetClient(int index) {
443 if (clients_.empty()) 432 if (clients_.empty())
(...skipping 684 matching lines...) Expand 10 before | Expand all | Expand 10 after
1128 1117
1129 void SyncTest::TriggerSyncForModelTypes(int index, 1118 void SyncTest::TriggerSyncForModelTypes(int index,
1130 syncer::ModelTypeSet model_types) { 1119 syncer::ModelTypeSet model_types) {
1131 GetSyncService(index)->TriggerRefresh(model_types); 1120 GetSyncService(index)->TriggerRefresh(model_types);
1132 } 1121 }
1133 1122
1134 void SyncTest::SetPreexistingPreferencesFileContents( 1123 void SyncTest::SetPreexistingPreferencesFileContents(
1135 const std::string& contents) { 1124 const std::string& contents) {
1136 preexisting_preferences_file_contents_ = contents; 1125 preexisting_preferences_file_contents_ = contents;
1137 } 1126 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698