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

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

Issue 1042803002: Drive: Move inner structures of DriveAPIService under drive namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tests. Created 5 years, 8 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
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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 "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer. h" 5 #include "chrome/browser/sync_file_system/drive_backend/sync_engine_initializer. h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/files/scoped_temp_dir.h" 8 #include "base/files/scoped_temp_dir.h"
9 #include "base/run_loop.h" 9 #include "base/run_loop.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
127 app_root_list.weak_clear(); 127 app_root_list.weak_clear();
128 return status; 128 return status;
129 } 129 }
130 130
131 scoped_ptr<google_apis::FileResource> CreateRemoteFolder( 131 scoped_ptr<google_apis::FileResource> CreateRemoteFolder(
132 const std::string& parent_folder_id, 132 const std::string& parent_folder_id,
133 const std::string& title) { 133 const std::string& title) {
134 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR; 134 google_apis::DriveApiErrorCode error = google_apis::DRIVE_OTHER_ERROR;
135 scoped_ptr<google_apis::FileResource> entry; 135 scoped_ptr<google_apis::FileResource> entry;
136 sync_context_->GetDriveService()->AddNewDirectory( 136 sync_context_->GetDriveService()->AddNewDirectory(
137 parent_folder_id, title, 137 parent_folder_id, title, drive::AddNewDirectoryOptions(),
138 drive::DriveServiceInterface::AddNewDirectoryOptions(),
139 CreateResultReceiver(&error, &entry)); 138 CreateResultReceiver(&error, &entry));
140 base::RunLoop().RunUntilIdle(); 139 base::RunLoop().RunUntilIdle();
141 140
142 EXPECT_EQ(google_apis::HTTP_CREATED, error); 141 EXPECT_EQ(google_apis::HTTP_CREATED, error);
143 return entry.Pass(); 142 return entry.Pass();
144 } 143 }
145 144
146 scoped_ptr<google_apis::FileResource> CreateRemoteSyncRoot() { 145 scoped_ptr<google_apis::FileResource> CreateRemoteSyncRoot() {
147 scoped_ptr<google_apis::FileResource> sync_root( 146 scoped_ptr<google_apis::FileResource> sync_root(
148 CreateRemoteFolder(std::string(), kSyncRootFolderTitle)); 147 CreateRemoteFolder(std::string(), kSyncRootFolderTitle));
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 340
342 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); 341 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id()));
343 EXPECT_FALSE(HasNoParent(sync_root->file_id())); 342 EXPECT_FALSE(HasNoParent(sync_root->file_id()));
344 343
345 EXPECT_EQ(1u, CountFileMetadata()); 344 EXPECT_EQ(1u, CountFileMetadata());
346 EXPECT_EQ(1u, CountFileTracker()); 345 EXPECT_EQ(1u, CountFileTracker());
347 } 346 }
348 347
349 } // namespace drive_backend 348 } // namespace drive_backend
350 } // namespace sync_file_system 349 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/sync_engine_initializer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698