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 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 // any call to the verifier() would fail. | 477 // any call to the verifier() would fail. |
478 return true; | 478 return true; |
479 } | 479 } |
480 | 480 |
481 void SyncTest::InitializeInstance(int index) { | 481 void SyncTest::InitializeInstance(int index) { |
482 CreateProfile(index); | 482 CreateProfile(index); |
483 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " | 483 EXPECT_FALSE(GetProfile(index) == NULL) << "Could not create Profile " |
484 << index << "."; | 484 << index << "."; |
485 | 485 |
486 // CheckInitialState() assumes that no windows are open at startup. | 486 // CheckInitialState() assumes that no windows are open at startup. |
487 browsers_[index] = new Browser(Browser::CreateParams( | 487 browsers_[index] = new Browser(Browser::CreateParams(GetProfile(index))); |
488 GetProfile(index), chrome::GetActiveDesktop())); | |
489 | 488 |
490 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " | 489 EXPECT_FALSE(GetBrowser(index) == NULL) << "Could not create Browser " |
491 << index << "."; | 490 << index << "."; |
492 | 491 |
493 // Make sure the ProfileSyncService has been created before creating the | 492 // Make sure the ProfileSyncService has been created before creating the |
494 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to | 493 // ProfileSyncServiceHarness - some tests expect the ProfileSyncService to |
495 // already exist. | 494 // already exist. |
496 ProfileSyncService* profile_sync_service = | 495 ProfileSyncService* profile_sync_service = |
497 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); | 496 ProfileSyncServiceFactory::GetForProfile(GetProfile(index)); |
498 | 497 |
(...skipping 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1098 | 1097 |
1099 void SyncTest::TriggerSyncForModelTypes(int index, | 1098 void SyncTest::TriggerSyncForModelTypes(int index, |
1100 syncer::ModelTypeSet model_types) { | 1099 syncer::ModelTypeSet model_types) { |
1101 GetSyncService(index)->TriggerRefresh(model_types); | 1100 GetSyncService(index)->TriggerRefresh(model_types); |
1102 } | 1101 } |
1103 | 1102 |
1104 void SyncTest::SetPreexistingPreferencesFileContents( | 1103 void SyncTest::SetPreexistingPreferencesFileContents( |
1105 const std::string& contents) { | 1104 const std::string& contents) { |
1106 preexisting_preferences_file_contents_ = contents; | 1105 preexisting_preferences_file_contents_ = contents; |
1107 } | 1106 } |
OLD | NEW |