Removes C++20-style designated initializers from oghttp2_session_test.cc PiperOrigin-RevId: 443686397
diff --git a/quiche/http2/adapter/oghttp2_session_test.cc b/quiche/http2/adapter/oghttp2_session_test.cc index c6ee166..c61f166 100644 --- a/quiche/http2/adapter/oghttp2_session_test.cc +++ b/quiche/http2/adapter/oghttp2_session_test.cc
@@ -29,8 +29,9 @@ TEST(OgHttp2SessionTest, ClientConstruction) { testing::StrictMock<MockHttp2Visitor> visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_TRUE(session.want_read()); EXPECT_FALSE(session.want_write()); EXPECT_EQ(session.GetRemoteWindowSize(), kInitialFlowControlWindowSize); @@ -40,8 +41,9 @@ TEST(OgHttp2SessionTest, ClientHandlesFrames) { testing::StrictMock<MockHttp2Visitor> visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); const std::string initial_frames = TestFrameSequence() .ServerPreface() @@ -145,8 +147,9 @@ // before any frames are explicitly queued. TEST(OgHttp2SessionTest, ClientEnqueuesSettingsOnSend) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); EXPECT_CALL(visitor, OnBeforeFrameSent(SETTINGS, 0, _, 0x0)); @@ -165,8 +168,9 @@ // frame type is passed to the first invocation of EnqueueFrame(). TEST(OgHttp2SessionTest, ClientEnqueuesSettingsBeforeOtherFrame) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); session.EnqueueFrame(absl::make_unique<spdy::SpdyPingIR>(42)); EXPECT_TRUE(session.want_write()); @@ -190,8 +194,9 @@ // the client session will not enqueue an additional SETTINGS frame. TEST(OgHttp2SessionTest, ClientEnqueuesSettingsOnce) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); session.EnqueueFrame(absl::make_unique<spdy::SpdySettingsIR>()); EXPECT_TRUE(session.want_write()); @@ -210,8 +215,9 @@ TEST(OgHttp2SessionTest, ClientSubmitRequest) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); @@ -320,8 +326,9 @@ // blocked. TEST(OgHttp2SessionTest, ClientSubmitRequestWithReadBlock) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); const char* kSentinel1 = "arbitrary pointer 1"; @@ -375,8 +382,9 @@ // blocked, then ends with an empty DATA frame. TEST(OgHttp2SessionTest, ClientSubmitRequestEmptyDataWithFin) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); const char* kSentinel1 = "arbitrary pointer 1"; @@ -429,8 +437,9 @@ // blocked. TEST(OgHttp2SessionTest, ClientSubmitRequestWithWriteBlock) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kClient}); + OgHttp2Session::Options options; + options.perspective = Perspective::kClient; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); const char* kSentinel1 = "arbitrary pointer 1"; @@ -475,8 +484,9 @@ TEST(OgHttp2SessionTest, ServerConstruction) { testing::StrictMock<MockHttp2Visitor> visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_TRUE(session.want_read()); EXPECT_FALSE(session.want_write()); EXPECT_EQ(session.GetRemoteWindowSize(), kInitialFlowControlWindowSize); @@ -486,8 +496,9 @@ TEST(OgHttp2SessionTest, ServerHandlesFrames) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_EQ(0, session.GetHpackDecoderDynamicTableSize()); @@ -606,8 +617,9 @@ // frame type is passed to the first invocation of EnqueueFrame(). TEST(OgHttp2SessionTest, ServerEnqueuesSettingsBeforeOtherFrame) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); session.EnqueueFrame(absl::make_unique<spdy::SpdyPingIR>(42)); EXPECT_TRUE(session.want_write()); @@ -627,8 +639,9 @@ // the server session will not enqueue an additional SETTINGS frame. TEST(OgHttp2SessionTest, ServerEnqueuesSettingsOnce) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); session.EnqueueFrame(absl::make_unique<spdy::SpdySettingsIR>()); EXPECT_TRUE(session.want_write()); @@ -643,8 +656,9 @@ TEST(OgHttp2SessionTest, ServerSubmitResponse) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); @@ -742,8 +756,9 @@ // exhausted. TEST(OgHttp2SessionTest, ServerSendsTrailers) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write()); @@ -833,8 +848,9 @@ // data, and before any writes have taken place. TEST(OgHttp2SessionTest, ServerQueuesTrailersWithResponse) { DataSavingVisitor visitor; - OgHttp2Session session( - visitor, OgHttp2Session::Options{.perspective = Perspective::kServer}); + OgHttp2Session::Options options; + options.perspective = Perspective::kServer; + OgHttp2Session session(visitor, options); EXPECT_FALSE(session.want_write());