#include "util/net/http_body_gzip.h"
#include <string.h>
#include <algorithm>
#include <memory>
#include <string>
#include <utility>
#include "base/containers/heap_array.h"
#include "base/numerics/safe_conversions.h"
#include "base/rand_util.h"
#include "gtest/gtest.h"
#include "third_party/zlib/zlib_crashpad.h"
#include "util/misc/zlib.h"
#include "util/net/http_body.h"
namespace crashpad {
namespace test {
namespace {
class ScopedZlibInflateStream { … };
void GzipInflate(const std::string& compressed,
std::string* decompressed,
size_t buf_size) { … }
void TestGzipDeflateInflate(const std::string& string) { … }
std::string MakeString(size_t size) { … }
constexpr size_t kFourKBytes = …;
constexpr size_t kManyBytes = …;
TEST(GzipHTTPBodyStream, Empty) { … }
TEST(GzipHTTPBodyStream, OneByte) { … }
TEST(GzipHTTPBodyStream, FourKBytes_NUL) { … }
TEST(GzipHTTPBodyStream, ManyBytes_NUL) { … }
TEST(GzipHTTPBodyStream, FourKBytes_Deterministic) { … }
TEST(GzipHTTPBodyStream, ManyBytes_Deterministic) { … }
TEST(GzipHTTPBodyStream, FourKBytes_Random) { … }
TEST(GzipHTTPBodyStream, ManyBytes_Random) { … }
}
}
}