#include "core/fpdfapi/parser/cpdf_read_validator.h"
#include <stdint.h>
#include <limits>
#include <utility>
#include "core/fxcrt/cfx_read_only_span_stream.h"
#include "core/fxcrt/cfx_read_only_vector_stream.h"
#include "core/fxcrt/data_vector.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/invalid_seekable_read_stream.h"
namespace {
constexpr uint32_t kTestDataSize = …;
std::pair<FX_FILESIZE, FX_FILESIZE> MakeRange(uint32_t start, uint32_t end) { … }
class MockFileAvail final : public CPDF_DataAvail::FileAvail { … };
class MockDownloadHints final : public CPDF_DataAvail::DownloadHints { … };
}
TEST(ReadValidatorTest, UnavailableData) { … }
TEST(ReadValidatorTest, UnavailableDataWithHints) { … }
TEST(ReadValidatorTest, ReadError) { … }
TEST(ReadValidatorTest, IntOverflow) { … }
TEST(ReadValidatorTest, Session) { … }
TEST(ReadValidatorTest, SessionReset) { … }
TEST(ReadValidatorTest, CheckDataRangeAndRequestIfUnavailable) { … }