#include "storage/browser/file_system/quota/quota_backend_impl.h"
#include <stdint.h>
#include <memory>
#include <string>
#include <utility>
#include "base/check.h"
#include "base/files/file_error_or.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/memory/scoped_refptr.h"
#include "base/run_loop.h"
#include "base/task/sequenced_task_runner.h"
#include "base/task/single_thread_task_runner.h"
#include "base/test/gmock_expected_support.h"
#include "base/test/task_environment.h"
#include "storage/browser/file_system/file_system_usage_cache.h"
#include "storage/browser/file_system/obfuscated_file_util.h"
#include "storage/browser/quota/quota_manager_proxy.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/common/storage_key/storage_key.h"
#include "third_party/leveldatabase/leveldb_chrome.h"
namespace storage {
namespace {
bool DidReserveQuota(bool accepted,
base::File::Error* error_out,
int64_t* delta_out,
base::File::Error error,
int64_t delta) { … }
class MockQuotaManagerProxy : public QuotaManagerProxy { … };
}
class QuotaBackendImplTest : public testing::Test,
public ::testing::WithParamInterface<bool> { … };
INSTANTIATE_TEST_SUITE_P(…);
TEST_P(QuotaBackendImplTest, ReserveQuota_Basic) { … }
TEST_P(QuotaBackendImplTest, ReserveQuota_NoSpace) { … }
TEST_P(QuotaBackendImplTest, ReserveQuota_Revert) { … }
TEST_P(QuotaBackendImplTest, ReleaseReservedQuota) { … }
TEST_P(QuotaBackendImplTest, CommitQuotaUsage) { … }
TEST_P(QuotaBackendImplTest, DirtyCount) { … }
}