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

Side by Side Diff: net/quic/quic_config_test.cc

Issue 471613002: Change how QUIC negotiates pacing from congestion feedback to QUIC (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@Add_max_bandwidth_max_bandwidth_timestamp_73055131
Patch Set: Created 6 years, 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/quic_config.h" 5 #include "net/quic/quic_config.h"
6 6
7 #include "net/quic/crypto/crypto_handshake_message.h" 7 #include "net/quic/crypto/crypto_handshake_message.h"
8 #include "net/quic/crypto/crypto_protocol.h" 8 #include "net/quic/crypto/crypto_protocol.h"
9 #include "net/quic/quic_flags.h" 9 #include "net/quic/quic_flags.h"
10 #include "net/quic/quic_protocol.h" 10 #include "net/quic/quic_protocol.h"
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 TEST_F(QuicConfigTest, ToHandshakeMessageWithPacing) { 81 TEST_F(QuicConfigTest, ToHandshakeMessageWithPacing) {
82 ValueRestore<bool> old_flag(&FLAGS_enable_quic_pacing, true); 82 ValueRestore<bool> old_flag(&FLAGS_enable_quic_pacing, true);
83 83
84 config_.SetDefaults(); 84 config_.SetDefaults();
85 CryptoHandshakeMessage msg; 85 CryptoHandshakeMessage msg;
86 config_.ToHandshakeMessage(&msg); 86 config_.ToHandshakeMessage(&msg);
87 87
88 const QuicTag* out; 88 const QuicTag* out;
89 size_t out_len; 89 size_t out_len;
90 EXPECT_EQ(QUIC_NO_ERROR, msg.GetTaglist(kCGST, &out, &out_len)); 90 EXPECT_EQ(QUIC_NO_ERROR, msg.GetTaglist(kCGST, &out, &out_len));
91 EXPECT_EQ(2u, out_len); 91 EXPECT_EQ(1u, out_len);
92 EXPECT_EQ(kPACE, out[0]); 92 EXPECT_EQ(kQBIC, out[0]);
93 EXPECT_EQ(kQBIC, out[1]);
94 } 93 }
95 94
96 TEST_F(QuicConfigTest, ProcessClientHello) { 95 TEST_F(QuicConfigTest, ProcessClientHello) {
97 QuicConfig client_config; 96 QuicConfig client_config;
98 QuicTagVector cgst; 97 QuicTagVector cgst;
99 cgst.push_back(kTSTP); 98 cgst.push_back(kTSTP);
100 cgst.push_back(kQBIC); 99 cgst.push_back(kQBIC);
101 client_config.set_congestion_feedback(cgst, kQBIC); 100 client_config.set_congestion_feedback(cgst, kQBIC);
102 client_config.set_idle_connection_state_lifetime( 101 client_config.set_idle_connection_state_lifetime(
103 QuicTime::Delta::FromSeconds(2 * kDefaultTimeoutSecs), 102 QuicTime::Delta::FromSeconds(2 * kDefaultTimeoutSecs),
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 EXPECT_DFATAL(config.SetInitialFlowControlWindowToSend(kInvalidWindow), 306 EXPECT_DFATAL(config.SetInitialFlowControlWindowToSend(kInvalidWindow),
308 "Initial flow control receive window"); 307 "Initial flow control receive window");
309 308
310 EXPECT_EQ(kDefaultFlowControlSendWindow, 309 EXPECT_EQ(kDefaultFlowControlSendWindow,
311 config.GetInitialFlowControlWindowToSend()); 310 config.GetInitialFlowControlWindowToSend());
312 } 311 }
313 312
314 } // namespace 313 } // namespace
315 } // namespace test 314 } // namespace test
316 } // namespace net 315 } // namespace net
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698