#ifdef UNSAFE_BUFFERS_BUILD
#pragma allow_unsafe_buffers
#endif
#include "net/spdy/spdy_write_queue.h"
#include <cstddef>
#include <cstring>
#include <string>
#include <utility>
#include "base/functional/bind.h"
#include "base/memory/ref_counted.h"
#include "base/notreached.h"
#include "base/strings/string_number_conversions.h"
#include "net/base/request_priority.h"
#include "net/log/net_log_with_source.h"
#include "net/spdy/spdy_buffer_producer.h"
#include "net/spdy/spdy_stream.h"
#include "net/traffic_annotation/network_traffic_annotation_test_helper.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "url/gurl.h"
namespace net {
namespace {
const char kOriginal[] = …;
const char kRequeued[] = …;
class SpdyWriteQueueTest : public ::testing::Test { … };
std::unique_ptr<SpdyBufferProducer> StringToProducer(const std::string& s) { … }
std::unique_ptr<SpdyBufferProducer> IntToProducer(int i) { … }
class RequeingBufferProducer : public SpdyBufferProducer { … };
std::string ProducerToString(std::unique_ptr<SpdyBufferProducer> producer) { … }
int ProducerToInt(std::unique_ptr<SpdyBufferProducer> producer) { … }
std::unique_ptr<SpdyStream> MakeTestStream(RequestPriority priority) { … }
TEST_F(SpdyWriteQueueTest, DequeuesByPriority) { … }
TEST_F(SpdyWriteQueueTest, DequeuesFIFO) { … }
TEST_F(SpdyWriteQueueTest, RemovePendingWritesForStream) { … }
TEST_F(SpdyWriteQueueTest, RemovePendingWritesForStreamsAfter) { … }
TEST_F(SpdyWriteQueueTest, Clear) { … }
TEST_F(SpdyWriteQueueTest, RequeingProducerWithoutReentrance) { … }
TEST_F(SpdyWriteQueueTest, ReentranceOnClear) { … }
TEST_F(SpdyWriteQueueTest, ReentranceOnRemovePendingWritesAfter) { … }
TEST_F(SpdyWriteQueueTest, ReentranceOnRemovePendingWritesForStream) { … }
TEST_F(SpdyWriteQueueTest, ChangePriority) { … }
}
}