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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_
6 #define CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_
8 #include "base/memory/scoped_ptr.h"
9 #include "chrome/browser/sync_file_system/sync_status_code.h"
10 #include "google_apis/drive/drive_api_error_codes.h"
12 namespace google_apis
{
16 namespace sync_file_system
{
17 namespace drive_backend
{
22 class MetadataDatabase
;
23 class ServiceMetadata
;
27 void ExpectEquivalentDetails(const FileDetails
& left
, const FileDetails
& right
);
28 void ExpectEquivalentMetadata(const FileMetadata
& left
,
29 const FileMetadata
& right
);
30 void ExpectEquivalentTrackers(const FileTracker
& left
,
31 const FileTracker
& right
);
33 scoped_ptr
<FileMetadata
> CreateFolderMetadata(const std::string
& file_id
,
34 const std::string
& title
);
35 scoped_ptr
<FileMetadata
> CreateFileMetadata(const std::string
& file_id
,
36 const std::string
& title
,
37 const std::string
& md5
);
38 scoped_ptr
<FileTracker
> CreateTracker(const FileMetadata
& metadata
,
40 const FileTracker
* parent_tracker
);
41 scoped_ptr
<FileTracker
> CreatePlaceholderTracker(
42 const std::string
& file_id
,
44 const FileTracker
* parent_tracker
);
46 // The return value type of GetFileResourceKind().
47 enum FileResourceKind
{
52 // Returns the kind of the given FileResourceKind.
53 FileResourceKind
GetFileResourceKind(const google_apis::FileResource
& resource
);
55 } // namespace test_util
56 } // namespace drive_backend
57 } // namespace sync_file_system
59 #endif // CHROME_BROWSER_SYNC_FILE_SYSTEM_DRIVE_BACKEND_DRIVE_BACKEND_TEST_UTIL_H_