Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / sync / syncable / syncable_unittest.cc
index 227b406..7e1aad5 100644 (file)
@@ -124,6 +124,7 @@ TestDirectory::TestDirectory(Encryptor* encryptor,
 TestDirectory::~TestDirectory() { }
 
 TEST(OnDiskSyncableDirectory, FailInitialWrite) {
+  base::MessageLoop message_loop;
   FakeEncryptor encryptor;
   TestUnrecoverableErrorHandler handler;
   base::ScopedTempDir temp_dir;
@@ -190,13 +191,6 @@ class OnDiskSyncableDirectoryTest : public SyncableDirectoryTest {
   base::FilePath file_path_;
 };
 
-sync_pb::DataTypeProgressMarker BuildProgress(ModelType type) {
-  sync_pb::DataTypeProgressMarker progress;
-  progress.set_token("token");
-  progress.set_data_type_id(GetSpecificsFieldNumberFromModelType(type));
-  return progress;
-}
-
 sync_pb::DataTypeContext BuildContext(ModelType type) {
   sync_pb::DataTypeContext context;
   context.set_context("context");
@@ -517,7 +511,8 @@ TEST_F(OnDiskSyncableDirectoryTest, TestSaveChangesFailure) {
 
 TEST_F(OnDiskSyncableDirectoryTest, TestSaveChangesFailureWithPurge) {
   int64 handle1 = 0;
-  // Set up an item using a regular, saveable directory.
+  // Set up an item and progress marker using a regular, saveable directory.
+  dir()->SetDownloadProgress(BOOKMARKS, BuildProgress(BOOKMARKS));
   {
     WriteTransaction trans(FROM_HERE, UNITTEST, dir().get());