chromium/content/browser/file_system_access/file_system_access_lock_manager_unittest.cc

// Copyright 2022 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#include "content/browser/file_system_access/file_system_access_lock_manager.h"

#include <cstdlib>
#include <ctime>
#include <memory>
#include <string>

#include "base/files/file_path.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/no_destructor.h"
#include "base/test/scoped_feature_list.h"
#include "base/test/task_environment.h"
#include "base/test/test_future.h"
#include "components/services/storage/public/cpp/buckets/bucket_locator.h"
#include "content/browser/file_system_access/features.h"
#include "content/browser/file_system_access/file_system_access_manager_impl.h"
#include "content/browser/renderer_host/render_frame_host_impl.h"
#include "content/public/test/browser_task_environment.h"
#include "content/public/test/test_renderer_host.h"
#include "storage/browser/blob/blob_storage_context.h"
#include "storage/browser/file_system/external_mount_points.h"
#include "storage/browser/file_system/file_system_url.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "storage/browser/test/test_file_system_context.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/features_generated.h"

namespace content {

LockType;
FileSystemURL;

static constexpr char kTestMountPoint[] =;

class FileSystemAccessLockManagerTest : public RenderViewHostTestHarness {};

TEST_F(FileSystemAccessLockManagerTest, ExclusiveLock) {}

TEST_F(FileSystemAccessLockManagerTest, SharedLock) {}

TEST_F(FileSystemAccessLockManagerTest, SandboxedFile) {}

TEST_F(FileSystemAccessLockManagerTest, SandboxedFilesSamePath) {}

TEST_F(FileSystemAccessLockManagerTest, SandboxedFilesDifferentBucket) {}

TEST_F(FileSystemAccessLockManagerTest, DifferentBackends) {}

TEST_F(FileSystemAccessLockManagerTest, LockAcrossSites) {}

TEST_F(FileSystemAccessLockManagerTest, AncestorLocks) {}

TEST_F(FileSystemAccessLockManagerTest, AncestorLocksExternal) {}

TEST_F(FileSystemAccessLockManagerTest, AncestorLocksSandboxed) {}

TEST_F(FileSystemAccessLockManagerTest, AncestorWithSameName) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheExclusive) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheShared) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheTakeChildThenParent) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheTakeParentThenChild) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictPendingLockRoot) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictDescendantPendingLockRoot) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictAncestorPendingLockRoot) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCacheEvictMultipleDescendantPendingLockRoot) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCachePendingLockDestroyedOnPromotion) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCacheDescendantPendingLockDestroyedOnPromotion) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCacheMultipleDescendantPendingLockDestroyedOnPromotion) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictPendingChild) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictAncestorOfPendingTree) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCacheEvictPendingAncestorOfEvictedLock) {}

TEST_F(FileSystemAccessLockManagerTest,
       BFCacheEvictPendingDescendantOfEvictedLock) {}

TEST_F(FileSystemAccessLockManagerTest, BFCacheEvictPendingTree) {}

TEST_F(FileSystemAccessLockManagerTest,
       LocksCanExistAfterFileSystemAccessManagerIsDestroyed) {}

}  // namespace content