Chromium Code Reviews| Index: chrome/browser/sync/profile_sync_service_unittest.cc |
| diff --git a/chrome/browser/sync/profile_sync_service_unittest.cc b/chrome/browser/sync/profile_sync_service_unittest.cc |
| index 53dba5424229eff49d28dbd9dce7649ff0af6153..3af98c00c8964093fc1426a519a5594242912ac7 100644 |
| --- a/chrome/browser/sync/profile_sync_service_unittest.cc |
| +++ b/chrome/browser/sync/profile_sync_service_unittest.cc |
| @@ -316,49 +316,6 @@ TEST_F(ProfileSyncServiceTest, |
| ui_loop_.RunAllPending(); |
| } |
| -// Make sure that things still work if sync is not enabled, but some old sync |
| -// databases are lingering in the "Sync Data" folder. |
| -TEST_F(ProfileSyncServiceTest, TestStartupWithOldSyncData) { |
|
Nicolas Zea
2012/09/13 00:45:55
why was this removed?
rlarocque
2012/09/14 01:03:07
It looks like I was a bit too hasty with this test
|
| - const char* nonsense1 = "reginald"; |
| - const char* nonsense2 = "beartato"; |
| - const char* nonsense3 = "harrison"; |
| - FilePath temp_directory = profile_->GetPath().AppendASCII("Sync Data"); |
| - FilePath sync_file1 = |
| - temp_directory.AppendASCII("BookmarkSyncSettings.sqlite3"); |
| - FilePath sync_file2 = temp_directory.AppendASCII("SyncData.sqlite3"); |
| - FilePath sync_file3 = temp_directory.AppendASCII("nonsense_file"); |
| - ASSERT_TRUE(file_util::CreateDirectory(temp_directory)); |
| - ASSERT_NE(-1, |
| - file_util::WriteFile(sync_file1, nonsense1, strlen(nonsense1))); |
| - ASSERT_NE(-1, |
| - file_util::WriteFile(sync_file2, nonsense2, strlen(nonsense2))); |
| - ASSERT_NE(-1, |
| - file_util::WriteFile(sync_file3, nonsense3, strlen(nonsense3))); |
| - |
| - StartSyncServiceAndSetInitialSyncEnded(false, false, true, false, |
| - syncer::STORAGE_ON_DISK); |
| - EXPECT_FALSE(service_->HasSyncSetupCompleted()); |
| - EXPECT_FALSE(service_->sync_initialized()); |
| - |
| - // Since we're doing synchronous initialization, backend should be |
| - // initialized by this call. |
| - IssueTestTokens(); |
| - |
| - // Stop the service so we can read the new Sync Data files that were |
| - // created. |
| - service_.reset(); |
| - |
| - // This file should have been deleted when the whole directory was nuked. |
| - ASSERT_FALSE(file_util::PathExists(sync_file3)); |
| - ASSERT_FALSE(file_util::PathExists(sync_file1)); |
| - |
| - // This will still exist, but the text should have changed. |
| - ASSERT_TRUE(file_util::PathExists(sync_file2)); |
| - std::string file2text; |
| - ASSERT_TRUE(file_util::ReadFileToString(sync_file2, &file2text)); |
| - ASSERT_NE(file2text.compare(nonsense2), 0); |
| -} |
| - |
| // Simulates a scenario where a database is corrupted and it is impossible to |
| // recreate it. This test is useful mainly when it is run under valgrind. Its |
| // expectations are not very interesting. |