Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(3945)

Unified Diff: chrome/browser/sync/profile_sync_service_unittest.cc

Issue 10825137: FYI: Control Data + Per-Device Metadata (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add PER_USER_METADATA, refactor some encryption code Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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 1a2fe90cbe7d9470732d7bb7c286e64aaa8aa700..11b0d4517be3faacfbb689b6eb452d239b70dfab 100644
--- a/chrome/browser/sync/profile_sync_service_unittest.cc
+++ b/chrome/browser/sync/profile_sync_service_unittest.cc
@@ -315,49 +315,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) {
rlarocque 2012/08/11 01:31:52 This test is not very useful anymore. I think the
- 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.

Powered by Google App Engine
This is Rietveld 408576698