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

Side by Side Diff: chrome/browser/sync_file_system/drive_backend/drive_backend_sync_unittest.cc

Issue 103013003: [SyncFS] Move APIUtil constants to V2 directory. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 11 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 <algorithm> 5 #include <algorithm>
6 6
7 #include "base/file_util.h" 7 #include "base/file_util.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "chrome/browser/drive/drive_uploader.h" 10 #include "chrome/browser/drive/drive_uploader.h"
11 #include "chrome/browser/drive/fake_drive_service.h" 11 #include "chrome/browser/drive/fake_drive_service.h"
12 #include "chrome/browser/sync_file_system/drive_backend/drive_backend_constants. h"
12 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h" 13 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.h"
13 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h" 14 #include "chrome/browser/sync_file_system/drive_backend/metadata_database.pb.h"
14 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h" 15 #include "chrome/browser/sync_file_system/drive_backend/sync_engine.h"
15 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_service_he lper.h" 16 #include "chrome/browser/sync_file_system/drive_backend_v1/fake_drive_service_he lper.h"
16 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h" 17 #include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
17 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h" 18 #include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
18 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h" 19 #include "chrome/browser/sync_file_system/local/local_file_sync_service.h"
19 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h" 20 #include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
20 #include "chrome/browser/sync_file_system/sync_file_system_test_util.h" 21 #include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
21 #include "chrome/browser/sync_file_system/syncable_file_system_util.h" 22 #include "chrome/browser/sync_file_system/syncable_file_system_util.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 63
63 remote_sync_service_.reset(new SyncEngine( 64 remote_sync_service_.reset(new SyncEngine(
64 base_dir_.path(), 65 base_dir_.path(),
65 file_task_runner_.get(), 66 file_task_runner_.get(),
66 drive_service.PassAs<drive::DriveServiceInterface>(), 67 drive_service.PassAs<drive::DriveServiceInterface>(),
67 uploader.Pass(), 68 uploader.Pass(),
68 NULL, NULL, NULL)); 69 NULL, NULL, NULL));
69 remote_sync_service_->Initialize(); 70 remote_sync_service_->Initialize();
70 71
71 fake_drive_service_helper_.reset(new FakeDriveServiceHelper( 72 fake_drive_service_helper_.reset(new FakeDriveServiceHelper(
72 fake_drive_service(), drive_uploader())); 73 fake_drive_service(), drive_uploader(),
74 kSyncRootFolderTitle));
73 75
74 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get()); 76 local_sync_service_->SetLocalChangeProcessor(remote_sync_service_.get());
75 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get()); 77 remote_sync_service_->SetRemoteChangeProcessor(local_sync_service_.get());
76 } 78 }
77 79
78 virtual void TearDown() OVERRIDE { 80 virtual void TearDown() OVERRIDE {
79 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator; 81 typedef std::map<std::string, CannedSyncableFileSystem*>::iterator iterator;
80 for (iterator itr = file_systems_.begin(); 82 for (iterator itr = file_systems_.begin();
81 itr != file_systems_.end(); ++itr) { 83 itr != file_systems_.end(); ++itr) {
82 itr->second->TearDown(); 84 itr->second->TearDown();
(...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after
471 EXPECT_TRUE(GetFileIDByPath(app_id, base::FilePath(path), &file_id)); 473 EXPECT_TRUE(GetFileIDByPath(app_id, base::FilePath(path), &file_id));
472 EXPECT_EQ(google_apis::HTTP_NO_CONTENT, 474 EXPECT_EQ(google_apis::HTTP_NO_CONTENT,
473 fake_drive_service_helper()->DeleteResource(file_id)); 475 fake_drive_service_helper()->DeleteResource(file_id));
474 476
475 EXPECT_EQ(SYNC_STATUS_OK, ProcessChangesUntilDone()); 477 EXPECT_EQ(SYNC_STATUS_OK, ProcessChangesUntilDone());
476 VerifyConsistency(); 478 VerifyConsistency();
477 } 479 }
478 480
479 } // namespace drive_backend 481 } // namespace drive_backend
480 } // namespace sync_file_system 482 } // namespace sync_file_system
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698