#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/spdy/spdy_buffer.h"
#include <cstddef>
#include <cstring>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/functional/callback.h"
#include "base/memory/ref_counted.h"
#include "net/base/io_buffer.h"
#include "net/third_party/quiche/src/quiche/http2/test_tools/spdy_test_utils.h"
#include "net/third_party/quiche/src/quiche/spdy/core/spdy_protocol.h"
#include "testing/gtest/include/gtest/gtest.h"
namespace net {
namespace {
const char kData[] = …;
const size_t kDataSize = …;
class SpdyBufferTest : public ::testing::Test { … };
std::string BufferToString(const SpdyBuffer& buffer) { … }
TEST_F(SpdyBufferTest, FrameConstructor) { … }
TEST_F(SpdyBufferTest, DataConstructor) { … }
void IncrementBy(size_t* x,
SpdyBuffer::ConsumeSource expected_consume_source,
size_t delta,
SpdyBuffer::ConsumeSource consume_source) { … }
TEST_F(SpdyBufferTest, Consume) { … }
TEST_F(SpdyBufferTest, ConsumeOnDestruction) { … }
TEST_F(SpdyBufferTest, GetIOBufferForRemainingData) { … }
TEST_F(SpdyBufferTest, IOBufferForRemainingDataOutlivesBuffer) { … }
}
}