#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "storage/browser/blob/blob_storage_context.h"
#include <memory>
#include "base/files/file_path.h"
#include "base/files/file_util.h"
#include "base/files/scoped_temp_dir.h"
#include "base/functional/bind.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/test/test_simple_task_runner.h"
#include "base/time/time.h"
#include "storage/browser/blob/blob_data_builder.h"
#include "storage/browser/blob/blob_data_handle.h"
#include "storage/browser/blob/blob_data_item.h"
#include "storage/browser/blob/blob_entry.h"
#include "storage/browser/blob/blob_memory_controller.h"
#include "storage/browser/blob/blob_storage_registry.h"
#include "storage/browser/blob/shareable_blob_data_item.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace storage {
namespace {
TestSimpleTaskRunner;
FileCreationInfo;
const size_t kTestBlobStorageIPCThresholdBytes = …;
const size_t kTestBlobStorageMaxSharedMemoryBytes = …;
const size_t kTestBlobStorageMaxBlobMemorySize = …;
const uint64_t kTestBlobStorageMaxDiskSpace = …;
const uint64_t kTestBlobStorageMinFileSizeBytes = …;
const uint64_t kTestBlobStorageMaxFileSizeBytes = …;
void SaveBlobStatusAndFiles(BlobStatus* status_ptr,
std::vector<FileCreationInfo>* files_ptr,
BlobStatus status,
std::vector<FileCreationInfo> files) { … }
}
class BlobFlattenerTest : public testing::Test { … };
TEST_F(BlobFlattenerTest, NoBlobItems) { … }
TEST_F(BlobFlattenerTest, ErrorCases) { … }
TEST_F(BlobFlattenerTest, BlobWithSlices) { … }
}