#include "third_party/blink/renderer/platform/blob/blob_bytes_provider.h"
#include <memory>
#include <utility>
#include "base/containers/heap_array.h"
#include "base/containers/span.h"
#include "base/files/file.h"
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/ranges/algorithm.h"
#include "base/run_loop.h"
#include "base/test/task_environment.h"
#include "base/time/time.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/public/platform/platform.h"
#include "third_party/blink/public/platform/scheduler/test/renderer_scheduler_test_support.h"
namespace blink {
class BlobBytesProviderTest : public testing::Test { … };
TEST_F(BlobBytesProviderTest, Consolidation) { … }
TEST_F(BlobBytesProviderTest, RequestAsReply) { … }
namespace {
struct FileTestData { … };
void PrintTo(const FileTestData& test, std::ostream* os) { … }
class RequestAsFile : public BlobBytesProviderTest,
public testing::WithParamInterface<FileTestData> { … };
TEST_P(RequestAsFile, AtStartOfEmptyFile) { … }
TEST_P(RequestAsFile, OffsetInEmptyFile) { … }
TEST_P(RequestAsFile, OffsetInNonEmptyFile) { … }
const FileTestData file_tests[] = …;
INSTANTIATE_TEST_SUITE_P(…);
TEST_F(BlobBytesProviderTest, RequestAsFile_MultipleChunks) { … }
TEST_F(BlobBytesProviderTest, RequestAsFile_InvaldFile) { … }
TEST_F(BlobBytesProviderTest, RequestAsFile_UnwritableFile) { … }
TEST_F(BlobBytesProviderTest, RequestAsStream) { … }
}
}