Chromium Code Reviews| Index: chrome/browser/sync/test/integration/two_client_uss_sync_test.cc |
| diff --git a/chrome/browser/sync/test/integration/two_client_uss_sync_test.cc b/chrome/browser/sync/test/integration/two_client_uss_sync_test.cc |
| index bbc32048e76ec01eb85f7fee2756d7c854d81dcd..c01662862161fa8fc147dbe78f1bdacad3756c3c 100644 |
| --- a/chrome/browser/sync/test/integration/two_client_uss_sync_test.cc |
| +++ b/chrome/browser/sync/test/integration/two_client_uss_sync_test.cc |
| @@ -201,6 +201,13 @@ class TwoClientUssSyncTest : public SyncTest { |
| ProfileSyncServiceFactory::SetSyncClientFactoryForTest( |
| &sync_client_factory_); |
| ProfileSyncComponentsFactoryImpl::OverridePrefsForUssTest(true); |
| + // The test infra creates a profile before the two made for sync tests. |
| + number_of_clients_ingnored_ = 1; |
|
Patrick Noland
2017/02/21 23:16:45
[nit] number_of_clients_ignored_
Gang Wu
2017/02/22 00:50:08
Done.
|
| +#if defined(OS_CHROMEOS) |
| + // ChromeOS will force loading a signin profile, so we need to ingore one |
| + // more client. |
| + ++number_of_clients_ingnored_; |
| +#endif |
| } |
| ~TwoClientUssSyncTest() override { |
| @@ -216,9 +223,8 @@ class TwoClientUssSyncTest : public SyncTest { |
| protected: |
| std::unique_ptr<syncer::SyncClient> CreateSyncClient(Profile* profile) { |
| - if (!first_client_ignored_) { |
| - // The test infra creates a profile before the two made for sync tests. |
| - first_client_ignored_ = true; |
| + if (number_of_clients_ingnored_ > 0) { |
| + --number_of_clients_ingnored_; |
| return base::MakeUnique<ChromeSyncClient>(profile); |
| } |
| auto bridge = base::MakeUnique<TestModelTypeSyncBridge>(); |
| @@ -231,7 +237,7 @@ class TwoClientUssSyncTest : public SyncTest { |
| ProfileSyncServiceFactory::SyncClientFactory sync_client_factory_; |
| std::vector<std::unique_ptr<TestModelTypeSyncBridge>> bridges_; |
| std::vector<TestSyncClient*> clients_; |
| - bool first_client_ignored_ = false; |
| + size_t number_of_clients_ingnored_; |
| private: |
| DISALLOW_COPY_AND_ASSIGN(TwoClientUssSyncTest); |