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