#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/filter/zstd_source_stream.h"
#include <utility>
#include "base/files/file_util.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "base/test/metrics/histogram_tester.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "net/filter/mock_source_stream.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "testing/platform_test.h"
namespace net {
namespace {
const size_t kDefaultBufferSize = …;
const size_t kLargeBufferSize = …;
base::FilePath GetTestDataDir() { … }
}
class ZstdSourceStreamTest : public PlatformTest { … };
TEST_F(ZstdSourceStreamTest, EmptyStream) { … }
TEST_F(ZstdSourceStreamTest, DecodeZstdOneBlockSync) { … }
TEST_F(ZstdSourceStreamTest, IgnoreExtraDataInOneRead) { … }
TEST_F(ZstdSourceStreamTest, IgnoreExtraDataInDifferentRead) { … }
TEST_F(ZstdSourceStreamTest, DecodeZstdTwoBlockSync) { … }
TEST_F(ZstdSourceStreamTest, DecodeZstdOneBlockAsync) { … }
TEST_F(ZstdSourceStreamTest, DecodeTwoConcatenatedFrames) { … }
TEST_F(ZstdSourceStreamTest, WithDictionary) { … }
TEST_F(ZstdSourceStreamTest, WindowSizeTooBig) { … }
}