#include "chrome/browser/sync_file_system/sync_file_system_service.h"
#include <stddef.h>
#include <memory>
#include <utility>
#include <vector>
#include "base/functional/bind.h"
#include "base/memory/raw_ptr.h"
#include "base/run_loop.h"
#include "base/synchronization/waitable_event.h"
#include "base/task/single_thread_task_runner.h"
#include "base/task/thread_pool.h"
#include "base/task/thread_pool/thread_pool_instance.h"
#include "chrome/browser/sync_file_system/local/canned_syncable_file_system.h"
#include "chrome/browser/sync_file_system/local/local_file_sync_context.h"
#include "chrome/browser/sync_file_system/local/local_file_sync_service.h"
#include "chrome/browser/sync_file_system/local/mock_sync_status_observer.h"
#include "chrome/browser/sync_file_system/local/sync_file_system_backend.h"
#include "chrome/browser/sync_file_system/mock_remote_file_sync_service.h"
#include "chrome/browser/sync_file_system/sync_callbacks.h"
#include "chrome/browser/sync_file_system/sync_event_observer.h"
#include "chrome/browser/sync_file_system/sync_file_metadata.h"
#include "chrome/browser/sync_file_system/sync_file_system_test_util.h"
#include "chrome/browser/sync_file_system/sync_status_code.h"
#include "chrome/browser/sync_file_system/syncable_file_system_util.h"
#include "chrome/test/base/testing_profile.h"
#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_utils.h"
#include "storage/browser/file_system/file_system_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/leveldatabase/leveldb_chrome.h"
_;
FileSystemURL;
FileSystemURLSet;
AnyNumber;
AtLeast;
InSequence;
InvokeWithoutArgs;
Return;
StrictMock;
WithArg;
namespace sync_file_system {
namespace {
const char kOrigin[] = …;
template <typename R> struct AssignTrait { … };
template <> struct AssignTrait<SyncFileStatus> { … };
template <typename R>
void AssignValueAndQuit(base::RunLoop* run_loop,
SyncStatusCode* status_out, R* value_out,
SyncStatusCode status,
typename AssignTrait<R>::ArgumentType value) { … }
void VerifyFileError(base::OnceClosure callback, base::File::Error error) { … }
}
class MockSyncEventObserver : public SyncEventObserver { … };
ACTION_P(RecordState, states) { … }
struct PostSyncFileCallback { … };
struct PostOnceClosureFunctor { … };
class SyncFileSystemServiceTest : public testing::Test { … };
TEST_F(SyncFileSystemServiceTest, InitializeForApp) { … }
TEST_F(SyncFileSystemServiceTest, InitializeForAppSuccess) { … }
TEST_F(SyncFileSystemServiceTest, InitializeForAppWithNetworkFailure) { … }
TEST_F(SyncFileSystemServiceTest, DISABLED_InitializeForAppWithError) { … }
TEST_F(SyncFileSystemServiceTest, DISABLED_SimpleLocalSyncFlow) { … }
TEST_F(SyncFileSystemServiceTest, SimpleRemoteSyncFlow) { … }
TEST_F(SyncFileSystemServiceTest, SimpleSyncFlowWithFileBusy) { … }
#if defined(THREAD_SANITIZER)
#define MAYBE_GetFileSyncStatus …
#else
#define MAYBE_GetFileSyncStatus …
#endif
TEST_F(SyncFileSystemServiceTest, MAYBE_GetFileSyncStatus) { … }
}