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

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

Issue 216433002: drive: Make FileResource copyable (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 9 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 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 "chrome/browser/drive/drive_api_util.h" 10 #include "chrome/browser/drive/drive_api_util.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 return drive::util::ConvertResourceEntryToFileResource(*entry); 128 return drive::util::ConvertResourceEntryToFileResource(*entry);
129 } 129 }
130 130
131 scoped_ptr<google_apis::FileResource> CreateRemoteSyncRoot() { 131 scoped_ptr<google_apis::FileResource> CreateRemoteSyncRoot() {
132 scoped_ptr<google_apis::FileResource> sync_root( 132 scoped_ptr<google_apis::FileResource> sync_root(
133 CreateRemoteFolder(std::string(), kSyncRootFolderTitle)); 133 CreateRemoteFolder(std::string(), kSyncRootFolderTitle));
134 134
135 for (size_t i = 0; i < sync_root->parents().size(); ++i) { 135 for (size_t i = 0; i < sync_root->parents().size(); ++i) {
136 google_apis::GDataErrorCode error = google_apis::GDATA_OTHER_ERROR; 136 google_apis::GDataErrorCode error = google_apis::GDATA_OTHER_ERROR;
137 fake_drive_service_.RemoveResourceFromDirectory( 137 fake_drive_service_.RemoveResourceFromDirectory(
138 sync_root->parents()[i]->file_id(), 138 sync_root->parents()[i].file_id(),
139 sync_root->file_id(), 139 sync_root->file_id(),
140 CreateResultReceiver(&error)); 140 CreateResultReceiver(&error));
141 base::RunLoop().RunUntilIdle(); 141 base::RunLoop().RunUntilIdle();
142 EXPECT_EQ(google_apis::HTTP_NO_CONTENT, error); 142 EXPECT_EQ(google_apis::HTTP_NO_CONTENT, error);
143 } 143 }
144 144
145 return sync_root.Pass(); 145 return sync_root.Pass();
146 } 146 }
147 147
148 std::string GetSyncRootFolderID() { 148 std::string GetSyncRootFolderID() {
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
326 326
327 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id())); 327 EXPECT_EQ(0u, CountTrackersForFile(sync_root->file_id()));
328 EXPECT_FALSE(HasNoParent(sync_root->file_id())); 328 EXPECT_FALSE(HasNoParent(sync_root->file_id()));
329 329
330 EXPECT_EQ(1u, CountFileMetadata()); 330 EXPECT_EQ(1u, CountFileMetadata());
331 EXPECT_EQ(1u, CountFileTracker()); 331 EXPECT_EQ(1u, CountFileTracker());
332 } 332 }
333 333
334 } // namespace drive_backend 334 } // namespace drive_backend
335 } // namespace sync_file_system 335 } // namespace sync_file_system
OLDNEW
« no previous file with comments | « chrome/browser/sync_file_system/drive_backend/metadata_database_unittest.cc ('k') | google_apis/drive/drive_api_parser.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698