diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 17:21:03 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2020-01-23 16:25:15 +0000 |
commit | c551f43206405019121bd2b2c93714319a0a3300 (patch) | |
tree | 1f48c30631c421fd4bbb3c36da20183c8a2ed7d7 /chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc | |
parent | 7961cea6d1041e3e454dae6a1da660b453efd238 (diff) | |
download | qtwebengine-chromium-c551f43206405019121bd2b2c93714319a0a3300.tar.gz |
BASELINE: Update Chromium to 79.0.3945.139
Change-Id: I336b7182fab9bca80b709682489c07db112eaca5
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc')
-rw-r--r-- | chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc b/chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc index a424adb565a..63a16f429b1 100644 --- a/chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc +++ b/chromium/net/third_party/quiche/src/spdy/core/spdy_framer_test.cc @@ -10,6 +10,7 @@ #include <cstdint> #include <limits> #include <tuple> +#include <utility> #include <vector> #include "net/third_party/quiche/src/spdy/core/array_output_buffer.h" @@ -23,7 +24,6 @@ #include "net/third_party/quiche/src/spdy/platform/api/spdy_arraysize.h" #include "net/third_party/quiche/src/spdy/platform/api/spdy_flags.h" #include "net/third_party/quiche/src/spdy/platform/api/spdy_logging.h" -#include "net/third_party/quiche/src/spdy/platform/api/spdy_ptr_util.h" #include "net/third_party/quiche/src/spdy/platform/api/spdy_string_utils.h" #include "net/third_party/quiche/src/spdy/platform/api/spdy_test.h" @@ -86,7 +86,7 @@ class SpdyFramerPeer { // header serialization path. static std::unique_ptr<SpdyHeadersIR> CloneSpdyHeadersIR( const SpdyHeadersIR& headers) { - auto new_headers = SpdyMakeUnique<SpdyHeadersIR>( + auto new_headers = std::make_unique<SpdyHeadersIR>( headers.stream_id(), headers.header_block().Clone()); new_headers->set_fin(headers.fin()); new_headers->set_has_priority(headers.has_priority()); @@ -155,7 +155,7 @@ class SpdyFramerPeer { static std::unique_ptr<SpdyPushPromiseIR> CloneSpdyPushPromiseIR( const SpdyPushPromiseIR& push_promise) { - auto new_push_promise = SpdyMakeUnique<SpdyPushPromiseIR>( + auto new_push_promise = std::make_unique<SpdyPushPromiseIR>( push_promise.stream_id(), push_promise.promised_stream_id(), push_promise.header_block().Clone()); new_push_promise->set_fin(push_promise.fin()); @@ -315,7 +315,7 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface, SpdyHeadersHandlerInterface* OnHeaderFrameStart( SpdyStreamId /*stream_id*/) override { if (headers_handler_ == nullptr) { - headers_handler_ = SpdyMakeUnique<TestHeadersHandler>(); + headers_handler_ = std::make_unique<TestHeadersHandler>(); } return headers_handler_.get(); } @@ -408,7 +408,7 @@ class TestSpdyVisitor : public SpdyFramerVisitorInterface, altsvc_vector) override { SPDY_VLOG(1) << "OnAltSvc(" << stream_id << ", \"" << origin << "\", altsvc_vector)"; - test_altsvc_ir_ = SpdyMakeUnique<SpdyAltSvcIR>(stream_id); + test_altsvc_ir_ = std::make_unique<SpdyAltSvcIR>(stream_id); if (origin.length() > 0) { test_altsvc_ir_->set_origin(std::string(origin)); } @@ -1033,7 +1033,7 @@ TEST_P(SpdyFramerTest, ContinuationWithStreamIdZero) { SpdyContinuationIR continuation(/* stream_id = */ 0); auto some_nonsense_encoding = - SpdyMakeUnique<std::string>("some nonsense encoding"); + std::make_unique<std::string>("some nonsense encoding"); continuation.take_encoding(std::move(some_nonsense_encoding)); continuation.set_end_headers(true); SpdySerializedFrame frame(framer_.SerializeContinuation(continuation)); @@ -2307,7 +2307,7 @@ TEST_P(SpdyFramerTest, CreateContinuationUncompressed) { SpdyHeaderBlock header_block; header_block["bar"] = "foo"; header_block["foo"] = "bar"; - auto buffer = SpdyMakeUnique<std::string>(); + auto buffer = std::make_unique<std::string>(); HpackEncoder encoder(ObtainHpackHuffmanTable()); encoder.DisableCompression(); encoder.EncodeHeaderSet(header_block, buffer.get()); @@ -2635,7 +2635,7 @@ TEST_P(SpdyFramerTest, TooLargeHeadersFrameUsesContinuation) { TEST_P(SpdyFramerTest, MultipleContinuationFramesWithIterator) { SpdyFramer framer(SpdyFramer::DISABLE_COMPRESSION); - auto headers = SpdyMakeUnique<SpdyHeadersIR>(/* stream_id = */ 1); + auto headers = std::make_unique<SpdyHeadersIR>(/* stream_id = */ 1); headers->set_padding_len(256); // Exact payload length will change with HPACK, but this should be long @@ -2699,8 +2699,8 @@ TEST_P(SpdyFramerTest, MultipleContinuationFramesWithIterator) { TEST_P(SpdyFramerTest, PushPromiseFramesWithIterator) { SpdyFramer framer(SpdyFramer::DISABLE_COMPRESSION); auto push_promise = - SpdyMakeUnique<SpdyPushPromiseIR>(/* stream_id = */ 1, - /* promised_stream_id = */ 2); + std::make_unique<SpdyPushPromiseIR>(/* stream_id = */ 1, + /* promised_stream_id = */ 2); push_promise->set_padding_len(256); // Exact payload length will change with HPACK, but this should be long @@ -2782,12 +2782,12 @@ class SpdyControlFrameIteratorTest : public ::testing::Test { }; TEST_F(SpdyControlFrameIteratorTest, RstStreamFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdyRstStreamIR>(0, ERROR_CODE_PROTOCOL_ERROR); + auto ir = std::make_unique<SpdyRstStreamIR>(0, ERROR_CODE_PROTOCOL_ERROR); RunTest(std::move(ir)); } TEST_F(SpdyControlFrameIteratorTest, SettingsFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdySettingsIR>(); + auto ir = std::make_unique<SpdySettingsIR>(); uint32_t kValue = 0x0a0b0c0d; SpdyKnownSettingsId kId = SETTINGS_INITIAL_WINDOW_SIZE; ir->AddSetting(kId, kValue); @@ -2796,22 +2796,22 @@ TEST_F(SpdyControlFrameIteratorTest, SettingsFrameWithIterator) { TEST_F(SpdyControlFrameIteratorTest, PingFrameWithIterator) { const SpdyPingId kPingId = 0x123456789abcdeffULL; - auto ir = SpdyMakeUnique<SpdyPingIR>(kPingId); + auto ir = std::make_unique<SpdyPingIR>(kPingId); RunTest(std::move(ir)); } TEST_F(SpdyControlFrameIteratorTest, GoAwayFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdyGoAwayIR>(0, ERROR_CODE_NO_ERROR, "GA"); + auto ir = std::make_unique<SpdyGoAwayIR>(0, ERROR_CODE_NO_ERROR, "GA"); RunTest(std::move(ir)); } TEST_F(SpdyControlFrameIteratorTest, WindowUpdateFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdyWindowUpdateIR>(1, 1); + auto ir = std::make_unique<SpdyWindowUpdateIR>(1, 1); RunTest(std::move(ir)); } TEST_F(SpdyControlFrameIteratorTest, AtlSvcFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdyAltSvcIR>(3); + auto ir = std::make_unique<SpdyAltSvcIR>(3); ir->set_origin("origin"); ir->add_altsvc(SpdyAltSvcWireFormat::AlternativeService( "pid1", "host", 443, 5, SpdyAltSvcWireFormat::VersionVector())); @@ -2822,7 +2822,7 @@ TEST_F(SpdyControlFrameIteratorTest, AtlSvcFrameWithIterator) { } TEST_F(SpdyControlFrameIteratorTest, PriorityFrameWithIterator) { - auto ir = SpdyMakeUnique<SpdyPriorityIR>(2, 1, 17, true); + auto ir = std::make_unique<SpdyPriorityIR>(2, 1, 17, true); RunTest(std::move(ir)); } @@ -4619,7 +4619,7 @@ TEST_P(SpdyFramerTest, ReadInvalidRstStreamWithPayload) { // to ProcessInput (i.e. will not be calling set_process_single_input_frame()). TEST_P(SpdyFramerTest, ProcessAllInput) { auto visitor = - SpdyMakeUnique<TestSpdyVisitor>(SpdyFramer::DISABLE_COMPRESSION); + std::make_unique<TestSpdyVisitor>(SpdyFramer::DISABLE_COMPRESSION); deframer_.set_visitor(visitor.get()); // Create two input frames. @@ -4704,7 +4704,7 @@ TEST_P(SpdyFramerTest, ProcessAtMostOneFrame) { for (size_t first_size = 0; first_size <= buf_size; ++first_size) { SPDY_VLOG(1) << "first_size = " << first_size; auto visitor = - SpdyMakeUnique<TestSpdyVisitor>(SpdyFramer::DISABLE_COMPRESSION); + std::make_unique<TestSpdyVisitor>(SpdyFramer::DISABLE_COMPRESSION); deframer_.set_visitor(visitor.get()); EXPECT_EQ(Http2DecoderAdapter::SPDY_READY_FOR_FRAME, deframer_.state()); |