#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include <string>
#include <utility>
#include "base/files/file_util.h"
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/raw_ptr.h"
#include "base/path_service.h"
#include "base/run_loop.h"
#include "net/base/io_buffer.h"
#include "net/base/test_completion_callback.h"
#include "net/filter/brotli_source_stream.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 kSmallBufferSize = …;
base::FilePath GetTestDataDir() { … }
}
class BrotliSourceStreamTest : public PlatformTest { … };
TEST_F(BrotliSourceStreamTest, DecodeBrotliOneBlockSync) { … }
TEST_F(BrotliSourceStreamTest, IgnoreExtraData) { … }
TEST_F(BrotliSourceStreamTest, IgnoreExtraDataInOneRead) { … }
TEST_F(BrotliSourceStreamTest, IgnoreExtraDataInDifferentRead) { … }
TEST_F(BrotliSourceStreamTest, DecodeBrotliTwoBlockSync) { … }
TEST_F(BrotliSourceStreamTest, DecodeBrotliOneBlockAsync) { … }
TEST_F(BrotliSourceStreamTest, DecodeWithSmallBufferSync) { … }
TEST_F(BrotliSourceStreamTest, DecodeWithSmallBufferAsync) { … }
TEST_F(BrotliSourceStreamTest, DecodeWithOneByteBuffer) { … }
TEST_F(BrotliSourceStreamTest, DecodeCorruptedData) { … }
TEST_F(BrotliSourceStreamTest, DecodeMissingData) { … }
TEST_F(BrotliSourceStreamTest, DecodeEmptyData) { … }
TEST_F(BrotliSourceStreamTest, WithDictionary) { … }
}