| 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 "base/basictypes.h" | 5 #include "base/basictypes.h" |
| 6 #include "base/compiler_specific.h" | 6 #include "base/compiler_specific.h" |
| 7 #include "base/file_util.h" | 7 #include "base/file_util.h" |
| 8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
| 9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 345 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 356 FilePath sync_file2 = temp_directory.AppendASCII("SyncData.sqlite3"); | 356 FilePath sync_file2 = temp_directory.AppendASCII("SyncData.sqlite3"); |
| 357 FilePath sync_file3 = temp_directory.AppendASCII("nonsense_file"); | 357 FilePath sync_file3 = temp_directory.AppendASCII("nonsense_file"); |
| 358 ASSERT_TRUE(file_util::CreateDirectory(temp_directory)); | 358 ASSERT_TRUE(file_util::CreateDirectory(temp_directory)); |
| 359 ASSERT_NE(-1, | 359 ASSERT_NE(-1, |
| 360 file_util::WriteFile(sync_file1, nonsense1, strlen(nonsense1))); | 360 file_util::WriteFile(sync_file1, nonsense1, strlen(nonsense1))); |
| 361 ASSERT_NE(-1, | 361 ASSERT_NE(-1, |
| 362 file_util::WriteFile(sync_file2, nonsense2, strlen(nonsense2))); | 362 file_util::WriteFile(sync_file2, nonsense2, strlen(nonsense2))); |
| 363 ASSERT_NE(-1, | 363 ASSERT_NE(-1, |
| 364 file_util::WriteFile(sync_file3, nonsense3, strlen(nonsense3))); | 364 file_util::WriteFile(sync_file3, nonsense3, strlen(nonsense3))); |
| 365 | 365 |
| 366 harness_.StartSyncServiceAndSetInitialSyncEnded(false, false, true, false, | 366 harness_.StartSyncServiceAndSetInitialSyncEnded(true, false, true, false, |
| 367 syncer::STORAGE_ON_DISK); | 367 syncer::STORAGE_ON_DISK); |
| 368 EXPECT_FALSE(harness_.service->HasSyncSetupCompleted()); | 368 EXPECT_FALSE(harness_.service->HasSyncSetupCompleted()); |
| 369 EXPECT_FALSE(harness_.service->sync_initialized()); | 369 EXPECT_FALSE(harness_.service->sync_initialized()); |
| 370 | 370 |
| 371 // Since we're doing synchronous initialization, backend should be | 371 // Since we're doing synchronous initialization, backend should be |
| 372 // initialized by this call. | 372 // initialized by this call. |
| 373 harness_.IssueTestTokens(); | 373 harness_.IssueTestTokens(); |
| 374 | 374 |
| 375 // Stop the service so we can read the new Sync Data files that were | 375 // Stop the service so we can read the new Sync Data files that were |
| 376 // created. | 376 // created. |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 575 namespace syncer { | 575 namespace syncer { |
| 576 namespace { | 576 namespace { |
| 577 | 577 |
| 578 // ProfileSyncService should behave just like an invalidator. | 578 // ProfileSyncService should behave just like an invalidator. |
| 579 INSTANTIATE_TYPED_TEST_CASE_P( | 579 INSTANTIATE_TYPED_TEST_CASE_P( |
| 580 ProfileSyncServiceInvalidatorTest, InvalidatorTest, | 580 ProfileSyncServiceInvalidatorTest, InvalidatorTest, |
| 581 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate); | 581 ::browser_sync::ProfileSyncServiceInvalidatorTestDelegate); |
| 582 | 582 |
| 583 } // namespace | 583 } // namespace |
| 584 } // namespace syncer | 584 } // namespace syncer |
| OLD | NEW |