Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(455)

Side by Side Diff: net/quic/core/quic_headers_stream_test.cc

Issue 2306173003: Add a new QuicFlagSaver class for saving/restoring the values of QUIC flags in tests. (Closed)
Patch Set: Better Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « net/quic/core/quic_framer_test.cc ('k') | net/quic/core/quic_packet_creator_test.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/core/quic_headers_stream.h" 5 #include "net/quic/core/quic_headers_stream.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "net/quic/core/quic_bug_tracker.h" 10 #include "net/quic/core/quic_bug_tracker.h"
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 374
375 void TearDownLocalConnectionState() { 375 void TearDownLocalConnectionState() {
376 QuicConnectionPeer::TearDownLocalConnectionState(connection_); 376 QuicConnectionPeer::TearDownLocalConnectionState(connection_);
377 } 377 }
378 378
379 QuicStreamId NextPromisedStreamId() { return next_promised_stream_id_ += 2; } 379 QuicStreamId NextPromisedStreamId() { return next_promised_stream_id_ += 2; }
380 380
381 static const bool kFrameComplete = true; 381 static const bool kFrameComplete = true;
382 static const bool kHasPriority = true; 382 static const bool kHasPriority = true;
383 383
384 QuicFlagSaver flags_; // Save/restore all QUIC flag values.
384 const TestParams test_params_; 385 const TestParams test_params_;
385 MockQuicConnectionHelper helper_; 386 MockQuicConnectionHelper helper_;
386 MockAlarmFactory alarm_factory_; 387 MockAlarmFactory alarm_factory_;
387 StrictMock<MockQuicConnection>* connection_; 388 StrictMock<MockQuicConnection>* connection_;
388 StrictMock<MockQuicSpdySession> session_; 389 StrictMock<MockQuicSpdySession> session_;
389 QuicHeadersStream* headers_stream_; 390 QuicHeadersStream* headers_stream_;
390 SpdyHeaderBlock headers_; 391 SpdyHeaderBlock headers_;
391 std::unique_ptr<TestHeadersHandler> headers_handler_; 392 std::unique_ptr<TestHeadersHandler> headers_handler_;
392 string body_; 393 string body_;
393 string saved_data_; 394 string saved_data_;
(...skipping 568 matching lines...) Expand 10 before | Expand all | Expand 10 after
962 } 963 }
963 saved_data_.clear(); 964 saved_data_.clear();
964 saved_payloads_.clear(); 965 saved_payloads_.clear();
965 } 966 }
966 } 967 }
967 } 968 }
968 969
969 } // namespace 970 } // namespace
970 } // namespace test 971 } // namespace test
971 } // namespace net 972 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/core/quic_framer_test.cc ('k') | net/quic/core/quic_packet_creator_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698