OLD | NEW |
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 513 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
524 // a case that returns false. In case we failed to create a verifier profile, | 524 // a case that returns false. In case we failed to create a verifier profile, |
525 // any call to the verifier() would fail. | 525 // any call to the verifier() would fail. |
526 return true; | 526 return true; |
527 } | 527 } |
528 | 528 |
529 void SyncTest::InitializeProfile(int index, Profile* profile) { | 529 void SyncTest::InitializeProfile(int index, Profile* profile) { |
530 DCHECK(profile); | 530 DCHECK(profile); |
531 profiles_[index] = profile; | 531 profiles_[index] = profile; |
532 | 532 |
533 // CheckInitialState() assumes that no windows are open at startup. | 533 // CheckInitialState() assumes that no windows are open at startup. |
534 browsers_[index] = new Browser(Browser::CreateParams(GetProfile(index))); | 534 browsers_[index] = |
| 535 new Browser(Browser::CreateParams(GetProfile(index), true)); |
535 | 536 |
536 EXPECT_NE(nullptr, GetBrowser(index)) << "Could not create Browser " << index; | 537 EXPECT_NE(nullptr, GetBrowser(index)) << "Could not create Browser " << index; |
537 | 538 |
538 // Make sure the ProfileSyncService has been created before creating the | 539 // Make sure the ProfileSyncService has been created before creating the |
539 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to | 540 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to |
540 // already exist. | 541 // already exist. |
541 ProfileSyncService* profile_sync_service = | 542 ProfileSyncService* profile_sync_service = |
542 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); | 543 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); |
543 | 544 |
544 if (server_type_ == IN_PROCESS_FAKE_SERVER) { | 545 if (server_type_ == IN_PROCESS_FAKE_SERVER) { |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 | 1134 |
1134 void SyncTest::TriggerSyncForModelTypes(int index, | 1135 void SyncTest::TriggerSyncForModelTypes(int index, |
1135 syncer::ModelTypeSet model_types) { | 1136 syncer::ModelTypeSet model_types) { |
1136 GetSyncService(index)->TriggerRefresh(model_types); | 1137 GetSyncService(index)->TriggerRefresh(model_types); |
1137 } | 1138 } |
1138 | 1139 |
1139 void SyncTest::SetPreexistingPreferencesFileContents( | 1140 void SyncTest::SetPreexistingPreferencesFileContents( |
1140 const std::string& contents) { | 1141 const std::string& contents) { |
1141 preexisting_preferences_file_contents_ = contents; | 1142 preexisting_preferences_file_contents_ = contents; |
1142 } | 1143 } |
OLD | NEW |