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

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

Issue 115393003: Fix two tests that fail when FLAGS_enable_quic_pacing is enabled (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years 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 | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_crypto_client_stream.h" 5 #include "net/quic/quic_crypto_client_stream.h"
6 6
7 #include "base/memory/scoped_ptr.h" 7 #include "base/memory/scoped_ptr.h"
8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h" 8 #include "net/quic/crypto/aes_128_gcm_12_encrypter.h"
9 #include "net/quic/crypto/quic_decrypter.h" 9 #include "net/quic/crypto/quic_decrypter.h"
10 #include "net/quic/crypto/quic_encrypter.h" 10 #include "net/quic/crypto/quic_encrypter.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails( 80 EXPECT_CALL(*connection_, SendConnectionCloseWithDetails(
81 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ")); 81 QUIC_INVALID_CRYPTO_MESSAGE_TYPE, "Expected REJ"));
82 stream_->ProcessRawData(message_data_->data(), message_data_->length()); 82 stream_->ProcessRawData(message_data_->data(), message_data_->length());
83 } 83 }
84 84
85 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) { 85 TEST_F(QuicCryptoClientStreamTest, NegotiatedParameters) {
86 CompleteCryptoHandshake(); 86 CompleteCryptoHandshake();
87 87
88 const QuicConfig* config = session_->config(); 88 const QuicConfig* config = session_->config();
89 EXPECT_EQ(kQBIC, config->congestion_control()); 89 EXPECT_EQ(FLAGS_enable_quic_pacing ? kPACE : kQBIC,
90 config->congestion_control());
90 EXPECT_EQ(kDefaultTimeoutSecs, 91 EXPECT_EQ(kDefaultTimeoutSecs,
91 config->idle_connection_state_lifetime().ToSeconds()); 92 config->idle_connection_state_lifetime().ToSeconds());
92 EXPECT_EQ(kDefaultMaxStreamsPerConnection, 93 EXPECT_EQ(kDefaultMaxStreamsPerConnection,
93 config->max_streams_per_connection()); 94 config->max_streams_per_connection());
94 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds()); 95 EXPECT_EQ(0, config->keepalive_timeout().ToSeconds());
95 96
96 const QuicCryptoNegotiatedParameters& crypto_params( 97 const QuicCryptoNegotiatedParameters& crypto_params(
97 stream_->crypto_negotiated_params()); 98 stream_->crypto_negotiated_params());
98 EXPECT_EQ(kAESG, crypto_params.aead); 99 EXPECT_EQ(kAESG, crypto_params.aead);
99 EXPECT_EQ(kC255, crypto_params.key_exchange); 100 EXPECT_EQ(kC255, crypto_params.key_exchange);
(...skipping 28 matching lines...) Expand all
128 129
129 // Check that a client hello was sent and that CryptoConnect doesn't fail 130 // Check that a client hello was sent and that CryptoConnect doesn't fail
130 // with an error. 131 // with an error.
131 EXPECT_TRUE(stream_->CryptoConnect()); 132 EXPECT_TRUE(stream_->CryptoConnect());
132 ASSERT_EQ(1u, connection_->packets_.size()); 133 ASSERT_EQ(1u, connection_->packets_.size());
133 } 134 }
134 135
135 } // namespace 136 } // namespace
136 } // namespace test 137 } // namespace test
137 } // namespace net 138 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_config_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698